You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

getElementsBy on submit form

Received Response
10
Views
6
Comments
edited Jul 27, 2018 3:42AM in Customer Portal 6 comments

Content

Hi,

I'm trying to do something I thought would work, but no luck. Has anyone pulled the value from OSvC form using javascript?

See code snippet below, any help would be great!

Thanks

Justin

Version

18B

Code Snippet

             <div class="rn_PageContent rn_AskQuestion rn_Container">
    <form id="rn_QuestionSubmit" method="post" action="/ci/ajaxRequest/sendForm">
        <div id="rn_ErrorLocation"></div>

        <rn:widget path="input/FormInput" name="Contact.Emails.PRIMARY.Address" required="true" initial_focus="true" label_input="#rn:msg:EMAIL_ADDR_LBL#"/>
        <rn:widget path="input/FormInput" name="Incident.Subject" required="true" label_input="#rn:msg:SUBJECT_LBL#"/>
<script>
var emailValue = document.getElementsByName("Contact.Emails.PRIMARY.Address").value;
document.write (emailValue);
</script>

          <rn:widget path="input/FormSubmit" label_button="#rn:msg:SUBMIT_YOUR_QUESTION_CMD#" on_success_url="/app/ask_confirm" error_location="rn_ErrorLocation"/>
    </form>
</div>
 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!