A hack to get conditional logic to work based on a text area
-
While conditional logic works perfectly for most fields, it seems to not work based on a TextArea “Contains” or “Empty” conditions.
Specifically, I’m trying to show a checkbox (review my profile) only when a TextArea field (Exam_Scores) contains any character, say, a letter “A”.
I’m thinking of writing an external php script, triggered every 30 minutes or so, that looks for the letter “A” in the TextArea for each member, and if it’s present, sets the value of hidden checkbox (say ‘hidden_review_checkbox’)in Ultimate Member. I could then set conditional logic based on that hidden checkbox.
Or, even better, I could write this as a function triggered off of UM Profile update.
add_action(‘um_before_submit_form_post’, ‘user_updated_profile’, 10, 1 );
I’m off to write this, but am posting here to see if it triggers (heh, see what I did there?) any warnings or ideas from the community.
THanks!
- The topic ‘A hack to get conditional logic to work based on a text area’ is closed to new replies.