Jump to content

Recommended Posts

Posted (edited)

So I'm trying to create a little page builder of sorts for the project section of a porfolio site using a section repeater.
The repeater includes fields for creating various section options to build out a page (1xfull-width screen image, image+txt, txt+image, 2ximages, triptych, etc.).
I added a "section-type" radio field with layout options so I can use if statements in the code to change what markup will be created in the template.

The screenshot below shows my repeater as it is now, but I'd like to use field dependencies to hide fields that are not required for the chosen layout type.
The problem is - I just can't manage to get the "Show this field only if..." to work for partial text matches or OR statements.

Taking the heading field as an example -- I only managed to hide the heading field with the following, and only for that one case: section_type%=heading_txt
I tried using OR statements, but this didnt work either: section_type%=heading_txt|txt_heading
Partial matching like this doesnt seem to work: section_type%=heading

Am I missing something obvious?
Would really appreciate any help.


1=single_image
2=two_images
3=three_images
4=txt_image
5=image_txt
6=heading_txt
7=txt_heading
 

PageBuilder.jpg

showonlyif.jpg

Edited by ai_slop

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...