Conditionally show or hide root line on multi-page forms

By: Rhett Finck | Asked: 10/30/2024
ForumsCategory: Code SnippetsConditionally show or hide root line on multi-page forms
Rhett Finck asked 1 month ago
Hi All, I'm really hoping you can assist me with this one.  I have a really long form, which I have split into pages. A Subscriber will complete the 1st 2 pages of my form, and then (with a [user_role] shortcode I am conditionally skipping pages for the Subscriber, but I then have an editor user who needs to continue completing the form.  Because the form has many pages, the Editor would like to browse through the pages using the rootline. However, I do not want the rootline to be vissibke to the subscriber.   Is there a way to conditionally show the rootline?   Thank you in advance for your assistance
1 Answers
Rob LeVineRob LeVine answered 1 month ago
Not without custom code. I've done something similar by using the WordPress body_class filter to add the role(s) to the page and then use a few lines of jQuery to hide the element based on that value.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right