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.

Issues with "Gform field css class" filter and multi-page next button

  1. andrebalza
    Member

    I've been trying to add a filter to the multi-page next button, in order to add bootstrap-related css class with no evident results. Should it work or it's an unsupported feature? Does the field object type button even exist?
    Thanks for your support.
    Andrea

    add_action('gform_field_css_class', 'roots_gform_next_button', 10, 3);
    function roots_gform_next_button($classes, $field, $form){
    if($field['type'] == 'button'){
            $classes .= ' btn-primary';
        }  
    
        return $classes;
    
    }
    Posted 11 years ago on Friday October 12, 2012 | Permalink
  2. I am going to guess though that this will not work. The buttons are not fields you add to your form. We can add a style to your button, but we will need a link to the form and an idea of what CSS you would like to apply. Basically, I think we will duplicate the CSS which is currently used for btn-primary in your theme, and make them apply to buttons in your Gravity Forms.

    Please post a link to your form. Thank you.

    Documentation reference:
    http://www.gravityhelp.com/documentation/page/Gform_field_css_class

    Posted 11 years ago on Sunday October 14, 2012 | Permalink
  3. andrebalza
    Member

    You can check it at
    http://www.ratekoulutus.com/beta/koulutus/ympristlakitiedon-tunnistaminen-ja-hallinta/#ilmoittautuminen

    Any case, as I would like to save the data entered in page 1 of 2 (in case someone does not complete the final page of the form), I guess i will disregard the multi-page feature and instead split the multi-page form in two distinct forms.
    Unless.. is there a way to save already a form entry when the next button gets pressed?
    (that´s OT question, if needed i can create new question for that)

    Thank you
    Andrea

    Posted 11 years ago on Wednesday October 17, 2012 | Permalink
  4. If you want to save the data from step one, you might want to use two separate forms, and pre-populate form 2 with the data submitted in form one. That way, if the form is abandoned, you will have the data from step one.

    There is also a new 3rd party add-on which claims to allow users to pick up a form submission where they left off. Maybe that can help in your situation. http://wordpress.org/extend/plugins/gravity-forms-data-persistence-add-on/ It requires that the user log in.

    Posted 11 years ago on Wednesday October 17, 2012 | Permalink
  5. andrebalza
    Member

    Data persistance would be an awesome feature, but my target user is too lazy/busy to register/login :)
    I´ll go for the first option, pre-populating the second form with data coming for the first. If the second form is abandoned, we can always contact the user via email to understand their needs.

    Thanks guys you awesome

    Andrea

    Posted 11 years ago on Wednesday October 17, 2012 | Permalink
  6. I agree with your approach. I hope that works out for you. If not, let us know. I think capturing the lead in the early stages makes sense so you can follow up with the visitor.

    Posted 11 years ago on Thursday October 18, 2012 | Permalink

This topic has been resolved and has been closed to new replies.