javascript input validation, input attributes

  1. eriksan
    Member

    Hello! I would like to make a form that uses an existing javascript to validate diffrent inputs depending on user choice (on submit or even better inline). For example:

    [Dropdown with 2 choices: A and B]
    If user choses A: Show and js-validate Input C
    If user choses B: Show and js-validate input D

    I love how easy it seems to show/hide inputs with the conditonal logic feature but how would I go about achieving the conditional validation with gravity forms?

    The form connects to a customer management system (an aspx file on the server) and the <inputs> have name attrubutes: name="123" Is it possible to set custom attributes on gravity form's inputs? How?

    Posted 3 months ago on Thursday February 2, 2012 | Permalink
  2. Yes, this is possible. You can add jQuery or JavaScript to the front end.

    Also, each element in Gravity Forms has a unique ID or class, and where none exist, you can modify or add to them by using the gform_pre_render filter to modify the form before it's displayed.

    Posted 3 months ago on Tuesday February 7, 2012 | Permalink

Leave A Reply

You must log in to post.