Conditional Requirement

Support MB Blocks Conditional RequirementResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32769
    Kyle MeltonKyle Melton
    Participant

    Hello,

    Is it possible to make a text field required based on an if/then/else statement done within the code template with TWIG? We have a button that pulls the url based on a global variable. If that variable is empty we need the text field to be filled out.

    Thank you!

    Kyle

    #32772
    Long NguyenLong Nguyen
    Moderator

    Hi Kyle,

    It is not possible to register/modify the custom field in the template file (even with Twig). I think you can use the extension MB Conditional Logic to show a required text field if another field is empty.
    https://docs.metabox.io/extensions/meta-box-conditional-logic/

    #32773
    Kyle MeltonKyle Melton
    Participant

    Thank you Long.

    I will look into that and we can close this thread.

    Appreciate your time.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.