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.
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/