Title: Using Javascript functions
Last modified: May 28, 2018

---

# Using Javascript functions

 *  Resolved [al9000nj](https://wordpress.org/support/users/al9000nj/)
 * (@al9000nj)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/using-javascript-functions/)
 * I am not sure how to follow using the Javascript instructions and examples. I
   tried using a basic linkage for the onclick event on the custom button I added
   to the form. Nothing is happening.
 * In the EDIT FIELD, I have the name which shows ok on the button on the form, 
   and I placed the name ppolicy on the ONCLICK box, this is the JS function I want
   to call.
    Name Privacy Policy OnClick ppolicy
 * The function I added to the Javascript page under Form Options -> JavaScript.
   //
   Occurs before the form is loaded function before_load() {
 * }
 * // Occurs just before submitting the form
    function before_submit() { // IMPORTANT!
   If you want to interrupt (stop) the submitting of the form, this function should
   return true. You don’t need to return any value if you don’t want to stop the
   submission. }
 * // Occurs just before resetting the form
    function before_reset() {
 * }
 * **//Privacy Policy button
    function ppolicy() { location.href=”[https://www.mobileyezusa.com/privacy-policy/;&#8221](https://www.mobileyezusa.com/privacy-policy/;&#8221);}

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Form Maker Support](https://wordpress.org/support/users/formmakersupport/)
 * (@formmakersupport)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/using-javascript-functions/#post-10340540)
 * Hi!
 * Please note that if you want to add a link, then it is more convenient to use**
   custom HTML** field.
 * Thanks, have a nice day!
 *  Thread Starter [al9000nj](https://wordpress.org/support/users/al9000nj/)
 * (@al9000nj)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/using-javascript-functions/#post-10411499)
 * ok, thanks. I did, however, it would really be nice if a plugin’s existing design
   or objects could be used without writing the CSS and HTML. I used just the text
   link for now, not into a lot of time to create the same look as the other form
   field buttons to look nicer. I can do some graphics stuff, but the idea of the
   plugin and WP was to minimize more work and code other stuff. It is ok, just 
   not expected. Nice to haves. Like getting the JS to work for a field that you
   can control like the other options such as submit and reset.
 * Thanks again.
 *  Plugin Contributor [Form Maker Support](https://wordpress.org/support/users/formmakersupport/)
 * (@formmakersupport)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/using-javascript-functions/#post-10413323)
 * Thanks for the good suggestion.
 * I will forward it to our development team. For instance, they will try to add
   a link option to a custom button.
    They will consider working on this for further
   updates.
 * Thanks again, have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Using Javascript functions’ is closed to new replies.

 * ![](https://ps.w.org/form-maker/assets/icon-256x256.png?rev=2068681)
 * [Form Maker by 10Web - Mobile-Friendly Drag & Drop Contact Form Builder](https://wordpress.org/plugins/form-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/form-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/form-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/form-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/form-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/form-maker/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Form Maker Support](https://wordpress.org/support/users/formmakersupport/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/using-javascript-functions/#post-10413323)
 * Status: resolved