Git Product home page Git Product logo

gravity-forms-section-tabs's Introduction

Gravity Forms: Section Tabs

Allows you to use the Gravity Forms section field to create tabbed interfaces for your forms. Requires Javascript to be enabled in the browser.

License

GPL2+

gravity-forms-section-tabs's People

Contributors

tyxla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gravity-forms-section-tabs's Issues

Tab Links Unresponsive

Hi tyxla. So glad I found your plugin. I was dreading trying to write it. I know it is impossible to test with all themes, so I doubt you have tested with mine. :-) Anyway, when I hover over a tab, it appears to be a link. I click the link and it does not go to that page/section of the form. I do not have any required fields that may prevent it from moving forward. Any idea what may be causing this?

Plugin Development

Hi there,

will you continue to work on this plugin? It's exactly what I was thinking of doing, but it makes sense to wrap it all into a flexible plugin.

Missing argument 3 for

Missing argument 3 for GFSectionTabsAddon::gform_pre_render()

i am using gravity form and have this error

Problem with install

Hi,

I don't seem to be able to use ur great plugin: after installation (and activation on a multisite WP environment) it doesn't even appear on GF settings :(

I really need this :) pls any advice?

Thanks!!!

idea : "next" button

Not sure if it makes super-sense - but maybe replacing the submit button with a 'Next' ( next tab ) button and then on the last tab displaying the final submit button might be interesting?

On the other hand it might replace the 'page break' functionality, however it's nicer to have it as tabs...

Update version numbers to highlight GF 2 fix

I thought I lost the plugin since I upgraded from GF 1.9 to GF 2. The add-on options didn't show anywhere any longer. I checked the version number here, which is 1.0 and on my install it was 1.0 as well. Then I realized that you're not increasing it. After running git pull the add-on was again available in GF 2.x

Maybe increment it the version number of the plugin when you push fixes? Ha

Integrate hashes

Hashes should be integrated to allow persisting the current tab.

How does this work?

I've installed this plugin and activated it, but there are no instructions on how to use it. I have a basic form, with some sections, but nothing has changed on the front end, and I don't see any new options on the back end?

Conditional tabs

By default gravity forms tabs are able to be toggled conditionally. When using this plugin this conditionality does not work.

not part of the tabs

how to always show, sample captcha fields or total field seen in every tabs or not part of forms section tabs?

On submit display the first tab with errors

When submitting a form with tabs and any of the tabs contain errors, the first tab should open. Once the error is corrected, the next tab with an error will be shown, until there are no errors.

better way to init

It might be better to inline the init javascript in gform_register_init_scripts like in this example : https://www.gravityhelp.com/documentation/article/gform_register_init_scripts/

The use-case where the current behaviour is breaking is when multiple forms are loaded on a page through ajax, and the initial 'gform_post_render' binding is being cleaned up between form loads with jQuery(document).unbind('gform_post_render');. ( This has been so far necessary so the input character counter doesn't get loaded multiple times on each consecutive form... )

So currently the section tabs then don't get initialized for the 2nd ajax form that was loaded, because the event listener on gform_post_render was removed, and then re-bound on the next ajax form load. Adding the listener with gform_register_init_scripts would add them after each ajax form, so that would keep the init on the safe side. Could be something like this :

add_action( 'gform_register_init_scripts', 'gform_section_tabs' );
function gform_section_tabs( $form ) {

    $script = "(function($){
        $('form.gravity_forms_section_tabs_enabled').each(function() {                                                                                                                                                                            
                initSectionTabs($(this).attr('id').replace('gform_', ''));                                                                                                                                                                        
        });
    })(jQuery);";

    GFFormDisplay::add_init_script( $form['id'], 'section_tabs', GFFormDisplay::ON_PAGE_RENDER, $script );
}

( This example would still not work, since initSectionTabs in the main.js is not in the public scope, so it would have to be moved maybe to e.g. window.gravity_forms_section_tabs.initSectionTabs to be able to call it from other functions )

What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.