Conditional Logic with validation

Support MB Conditional Logic Conditional Logic with validation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3450
    weseoweseo
    Participant

    Hello, i cannot use the conditional logic with the validation plugin.
    I can't save the post when there are hidden required fields exists.

    Is it possible to set the hidden fields "disabled"?
    Then the conditional logic will work with the validation plugin
    and when i save the post the hidden fields set the meta value to null.

    Big thanks

    #3454
    Tan NguyenTan Nguyen
    Participant

    Dear weseo,

    Thanks for using our plugins. As your field is required, it shouldn't be hidden and vice versa, this will breaks our scripts functionality. So you can change your require validation logic if it's possible.

    Best regards

    Tan

    #3463
    weseoweseo
    Participant

    Hello, in my plugin you can choose between 3 Accounts with a select field:
    Github, Gitlab, Bitbucket.

    1 Account have 2 text fields:
    github_projectname
    github_username

    gitlab_projectname
    gitlab_username

    bitbucket_projectname
    bitbucket_username

    When you choose GitHub, the Fields github_projectname and github_username are visible and required -> the other fields are hidden.
    When you choose Gitlab, the Fields gitlab_projectname and gitlab_username are visible and required -> the other fields are hidden.
    The same with Bitbucket.

    Now when i save the post -> the other 4 hidden fields are required and the post can't be saved.

    This is my problem 🙁

    #3467
    Tan NguyenTan Nguyen
    Participant

    I see, with your case, I'd recommended:

    - A select field: Github, Gitlab, Bitbucket.

    - (Optional): Three labels: Github Username, Gitlab Username, Bitbucket Username, visible when select field equal to label.

    - A Text field: Username

    So your wp_postmeta table will cleaner because it only save 2 fields instead of 4, and the validation will works.

    Cheers!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Conditional Logic with validation’ is closed to new replies.