8000 Validation of requied input before moving to next page · Issue #37 · dominicbarnes/jWizard · GitHub
[go: up one dir, main page]

Skip to content

Validation of requied input before moving to next page #37

Open

Description

@dleffler

Not sure why it doesn't validate the current page required, etc... entries prior to moving to next page? Is there a hook or something to enable this feature...otherwise this wizard is kind of just a novel concept, but doesn't help the user much?

Activity

  1. dominicbarnes commented on Jun 2, 2013

    @dominicbarnes
    Owner

    Validation is completely in your hands as a developer, so you can use any library you wish.

    You can stop progression between steps by hooking into the events and using either event.preventDefault(); or return false;.

  2. dominicbarnes commented on Jun 3, 2013

    @dominicbarnes
    Owner

    I'm working on a set of new examples, including one to demonstrate the use of the validation plugin in conjunction with jWizard.

    That branch also includes a small bugfix via b7000d3 for step transitions.

  3. usubhash commented on Sep 10, 2013

    @usubhash

    you are validating on stepHide. How can I validate only on Next button click? I could not get events to work

  4. dominicbarnes commented on Sep 10, 2013

    @dominicbarnes
    Owner

    The stephide (case-sensitive) event is triggered when the next button is clicked, cancelling that event causes the current step to remain active.

    If you need help with some actual code, perhaps create a gist or something and I can help you out better that way.

  5. usubhash commented on Sep 10, 2013

    @usubhash

    Right now the event gets called on previous or cancel or click on menu item
    on the left. I tweaked next function to trigger step next
    On Sep 10, 2013 1:38 PM, "Dominic Barnes" notifications@github.com wrote:

    The stepHide event is triggered when the next button is clicked,
    cancelling that event causes the current step to remain active.

    If you need help with some actual code, perhaps create a gist or something
    and I can help you out better that way.

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-24192430
    .

  6. dominicbarnes commented on Sep 10, 2013

    @dominicbarnes
    Owner

    So, are you saying there's some sort of bug? Can you post some code (either here or in a gist) to help clarify?

  7. usubhash commented on Sep 11, 2013

    @usubhash

    here is the gist: https://gist.github.com/anonymous/6518048
    On Sep 10, 2013, at 1:38 PM, Dominic Barnes notifications@github.com wrote:

    The stepHide event is triggered when the next button is clicked, cancelling that event causes the current step to remain active.

    If you need help with some actual code, perhaps create a gist or something and I can help you out better that way.

    —
    Reply to this email directly or view it on GitHub.

  8. dominicbarnes commented on Sep 11, 2013

    @dominicbarnes
    Owner

    Ok, I think I understand the problem now. You're saying that the validation is running regardless of whether next/previous is clicked, so if the form is invalid the user can't go back.

    I think the ideal solution here is to include the indexes of the steps involved in the event handler arguments. Using this data, you can compare the indexes to see if we're going forward (next) or backward. (previous) I'll make sure to mention this issue number in the commit so it automatically shows up here.

  9. achimha commented on Feb 28, 2014

    @achimha

    Is there a patch somewhere that allows me to differentiate between Previous and Next in the stephide event handler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0