Custom Fields
Re-Envisioned
Support MB Blocks Conditional Requirement

  • Creator
    Topic
  • #32769
    Resolved Kyle 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #32772
    Long 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 Melton
    Participant

    Thank you Long.

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

    Appreciate your time.

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