PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Conditional text field issue

  1. drlelong
    Member

    Hi,

    When I add a conditional text field that depends on selecting a particular value from a drop-down field, I cannot submit the form. When I click submit, nothing happens.

    As soon as I remove the conditional text field, I can submit the form again.

    You can see this behavior here:

    http://jcf.mu.librohq.net/contact/
    Username: gravity
    Password: gravity123

    Select "Friend" from the drop-down and the conditional text field will appear.

    Please advise.

    Thanks,

    David

    Posted 14 years ago on Thursday August 12, 2010 | Permalink
  2. Are you using the "gform_submit_button" filter to manipulate the button?

    The reason I ask is because the button markup is incomplete. The script is looking for an ID on the button element that's not there.

    <script type='text/javascript'>
            jQuery(document).ready(function(){
                gf_apply_rules(1, [7]);
                jQuery('#gform_wrapper_1').show();
    
                //preventing 'Enter' key from submitting the form when submit button is hidden
                jQuery('#gform_1').submit(
                    function(){
                        return jQuery('#gform_submit_button_1').is(':visible');
                    }
                );
            });
            if(!window['gf_form_conditional_logic'])
                window['gf_form_conditional_logic'] = new Array();
    
            window['gf_form_conditional_logic'][1] = {'logic' : {7: {"field":{"actionType":"show","logicType":"all","rules":[{"fieldId":"4","operator":"is","value":"Friend"}]},"section":null}}, 'dependents' : {7: [7]}};</script>

    Normal button markup looks like this..

    <input type="submit" tabindex="4" value="Submit" class="button" id="gform_submit_button_2">

    but yours looks like this.

    <input type='submit' value='' />

    No ID on the button element means the script doesn't know what to do with it. Fix that and you should be good to go.

    Posted 14 years ago on Thursday August 12, 2010 | Permalink
  3. cvenable
    Member

    My form is working well, but if the client hits the 'enter/return key' while filling out the form instead of just tabbing or using mouse to navigate to the next field it actually submits the form before they finish filling it out. Any suggestions?
    http://freshlymadedirt.com/how-to-order

    Posted 14 years ago on Tuesday October 5, 2010 | Permalink
  4. Submitting a form via the enter/return key is a normal form behavior. If you want to disable this, there are tons of options out there to do so.

    http://j.mp/ca1d6Q

    This is way off topic here too. You should probably start a new topic next time.

    Posted 14 years ago on Tuesday October 5, 2010 | Permalink