Conditional Placeholder for Custom Attributes
-
I have created a custom attributes to allow my event to display ‘No sign up required’ or ‘sign up required’
here is my php code
<p class="signup"><?php echo $EM_Event->output('#_ATT{Sign up}{No sign up required|Sign up required}'); ?></p>
How would I write a custom function to find out if a user has selected option A (No sign up required) or B (Sign up required)? so I change the color of the p tag by concatenating a class name (
yes
) after thesignup
class.e.g.
If a user selected option A the class nameyes
will be added in the p tag like this.
<p class="signup yes"><?php echo $EM_Event->output('#_ATT{Sign up}{No sign up required|Sign up required}'); ?></p>
- The topic ‘Conditional Placeholder for Custom Attributes’ is closed to new replies.