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.

Pure javascript paging

  1. Having ajax paging is nice but it has some downside, particularly in [re]initializing special forms fields that are stylized with javascript. Having the entire form markup generated at page load and hidden in divs would be extremely helpful in this sort of scenario.

    i.e. page load:

    <div>page 1</div>
    <div style="display:none;">page 2</div>
    <div style="display:none;">page 3</div>

    :clicks next:

    <div style="display:none;">page 1</div>
    <div>page 2</div>
    <div style="display:none;">page 3</div>

    Posted 13 years ago on Thursday November 18, 2010 | Permalink
  2. I agree with you, but the main problem we faced was validation. We wanted to validate the form at every step instead of letting users go all the way to the end of the form only to find out they missed something on page 1. What I am going to do is add a jQuery event that you can "bind" to and run the appropriate scripts that need to be run on the next page.

    Posted 13 years ago on Thursday November 18, 2010 | Permalink
  3. Well, it seems like gravity forms is still in need of a good client-side validation script. I must admit, not having javascript validation was a bit of a deterrent for me. However, I need to consider all areas of my company and the clients and the benefits for gravity forms far outweigh the loses.

    Not that this is a complete loss because to SOME degree, I can slap some javascript validation on myself. However, an 'official' solution would be preferred.

    To address your binding solution, there is a problem that I will face in my flow, where I'm stylizing form fields via jquery ui. You have to make sure that you're not /re/initializing items. The only way to do this is to filter the objects you're initializing by their currently selected 'page'. This gets tedious and annoying, where a catch all initialization is a piece of cake.

    Typically outside of wordpress, I develop forms using jQuery TOOLS ( http://flowplayer.org/tools ) which has a great / smooth / fast / sexy implementation of a "pure javascript paging wizard" http://flowplayer.org/tools/demos/scrollable/wizard.html

    It would be nice if gravity forms could include something like this but the problem with libraries like this, it's something that should be implemented at a lower level so other plugins can have access to their functions without having to include their own copy. Of course, I don't expect this library to be included in WordPress, whom has already done strange things with their inclusion of popular libraries and limits to their implementation.

    Posted 13 years ago on Thursday November 18, 2010 | Permalink