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

Form submit for custom input widget

Accepted answer
45
Views
4
Comments
edited Jul 16, 2015 8:16AM in Customer Portal 4 comments

Content

Hello, I am trying to create a custom widget, and to place it in a form with a formSubmit button.



PAGE CODE:




<form id="rn_CreateAccount" method="post" action="" onsubmit="return false;">
<rn:widget path="input/FormInput" name="contacts.email"
required="true" require_validation="true" />
<rn:widget path="input/SetLogin" /> (my widget)
<rn:widget path="input/FormSubmit"
label_button="#rn:msg:CREATE_ACCT_CMD#"
on_success_url="/app/account/overview"
error_location="rn_ErrorLocation"/>
</form>


 



WIDGET CODE:




RightNow.namespace('Custom.Widgets.input.SetLogin');
Custom.Widgets.input.SetLogin = RightNow.Field.extend({
overrides: {
constructor: function() {
this.parent();
[...code...]
this.parentForm().on("submit", this.onValidate, this);

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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