Additional Attributes

sean created the topic: Additional Attributes

Hi,

Does anyone have an example of the "Additional Attributes" field being used successfuly?
I want to restrict certain values in a date field, and I am hoping this may do it .

Thanks in advance,

Sean

#660

Please Log in or Create an account to join the conversation.


Administrator replied the topic: Re: Additional Attributes

Dear Sean
To run a script before submission, you need to

  • add a custom button instead of standard "Submit and Reset".
  • assign a custom function name to OnClick function attribute of the button.
  • define the function in the "Edit JavaScript" page. In this function, you can perform the required validation and submit the form using the function call check_required('submit') which will perform the standard steps and submit the form.

--
Best regards
Web-Dorado team

#674

Please Log in or Create an account to join the conversation.


lukask replied the topic: Re: Additional Attributes

Admin,
could you please give a hint, how to add an "onclick" conversion tracking (I use Google Analytics)...

thanks, Lukas

#935

Please Log in or Create an account to join the conversation.


Administrator replied the topic: Re: Additional Attributes

Dear Lukask,

you can add an additional attribute with name OnClick and the value is the javascript function which you want to work onclick.

--
Best regards
Web-Dorado team

#936

Please Log in or Create an account to join the conversation.


lukask replied the topic: Re: Additional Attributes

Thanks for the answer.
Can you help me with a format with the javascript function?
I have "onclick" as a name and "_gaq.push();" as a value. But if I click on a send button, nothing happens now...
Thanks

#940

Please Log in or Create an account to join the conversation.


Administrator replied the topic: Re: Additional Attributes

Dear lukask,
The function "_gaq.push" does not submit your form, so if you set that function to the onclick attribute of a button, this button will call that function, but will not submit the form. If you want to call this function and then submit the form, you should define a new function in the "Edit JavaScript" page:

for example

function newFunction()
{
_gaq.push();
check_required('submit');
}


Then you should assign the function newFunction() to "OnClick function" attribute of the button.

Best regards
Web-Dorado team

#955
The following user(s) said Thank You: lukask

Please Log in or Create an account to join the conversation.


Time to create page: 0.192 seconds
Powered by Kunena Forum

WORLD-CLASS SUPPORT

We are here for you every step of the way. Turn to our support with any questions you might have about our products and services. Our experienced customer care team is available to help you as fast as we possibly can.

Contact us