Customer Portal

Get Involved. Join the Conversation.

Topic

    ashish bodhale
    Using html elements on ask page and validate it before form...Answered
    Topic posted December 4, 2018 by ashish bodhaleRed Ribbon: 250+ Points 
    40 Views, 1 Comment
    Title:
    Using html elements on ask page and validate it before form submission
    Summary:
    Using html elements on ask page and validate it before form submission
    Content:

    I have a requirement to add some html form elements and not to use the form input widgets on Ask page, where I want to add validation for these html elements, even after adding the validation, the form submits by bypassing the validation. Is there any way to stop the submission of form and do the validation first and if everything is valid then only submit the form?

    Best Comment

    Sebastiaan Draaisma

    Yes, this can be done with standard javascript on the ask.php where you basically disable/hide the following code on-load and make it visible when requirements have been met.

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

    Comment

     

    • Sebastiaan Draaisma

      Yes, this can be done with standard javascript on the ask.php where you basically disable/hide the following code on-load and make it visible when requirements have been met.

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