We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
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

Run JavaScript after a form has been submitted

Received Response
edited Sep 18, 2018 11:22AM in Customer Portal 1 comment


I have a widget. Within that widget I have several forms like the one shown in the code below.

What I want is after the form has been submitted successfully, to close the modal and clear the input values

I've tried subscribing to evt_formButtonSubmitResponse but it doesn't seem to work. Subscribing to evt_formButtonSubmitRequest does but it's only when the form is submitted rather than after a successful submission

Any guidance? I have a feeling I'll need to do a custom submit widget but I'd rather not!

Code Snippet

<form id="rn_QuestionSubmitRestrictions" method="post" action="/ci/ajaxRequest/sendForm">
			<div id="rn_ErrorLocation"></div>
			<div style="display : none">
				<rn:widget path="input/ProductCategoryInput" name="Incident.Product"  default_value="8"/>
				<rn:widget path="input/ProductCategoryInput" name="Incident.Category"  default_value="360"/>
				<rn:widget path="input/FormInput" name="Incident.Subject" default_value = "My Details - My Restrictions"/>
			<div class="form-group">
				<rn:widget path="input/FormInput" required="true" name="Incident.CustomFields.c.type_of_enquiry" label_input="#rn:msg:CUSTOM_MSG_TITLE_REQUEST#" />
			<div class="form-group">
				<rn:widget path="input/FormInput" name="Incident.CustomFields.c.details_of_enquiry" required="true" label_input="#rn:msg:CUSTOM_MSG_DETAIL_ENQUIRY#"  />
			<rn:widget path="input/FormSubmit" label_button="#rn:msg:CONTINUE_ELLIPSIS_CMD#" on_success_url="none" label_on_success_banner="Request successfully submitted" error_location="rn_ErrorLocation"/>	

Howdy, Stranger!

Log In

To view full details, sign in.


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