123 Posts
EclipseMedia
6 years ago
Topic

I would like to display I field on the front end based on the selection of another field. This is for content type.

I have 15 free text fields with details specific to a "country". I want only one field to be displayed depending on what the "Select - Simple" Country field is. 

For example. If the "Select - Simple" Country equals Haiti, then I want the free text field that is about Haiti to be shown. I tried using restriction (4) but it doesn't work.

HERE IS THE SETTINGS

Restriction -> Fields
Property = Value
Invert = No
Field Name / Values = country (the simple - select field) is Equal / In Variable

Type = String
Variable = Haiti (one of the simple - select field options)
Default Value = blank
Multiple = No
Ignore "0 / Null" = No
Encryption = None

Get a Book for SEBLOD
4229 Posts
Kadministrator
6 years ago
0
Level 1

Fields Restriction can't work on the form when you add new item, form only has values after it is saved. Foryour case you need to use conditionals

123 Posts
EclipseMedia
6 years ago
1
Level 1

I have the plugin, but I need the condition to be used for CONTENT tab. Maybe I am approaching this the wrong way. I simply want to "show" a field on the frontend based on a specific variable from a simple - select field. I want to show the "Free Text field" called Haiti Country if the Country field = Haiti.

4229 Posts
Kadministrator
6 years ago
0
Level 2

Hi,

than you can use Seblod fields restriction plugin on each of your free text fields, so that this field only shows when value of your select matches. Please note you need to use value not text.

123 Posts
EclipseMedia
6 years ago
0
Level 1

I got it working. I changed Default to URL -> Variable when I should of left it Default. Works perfect

Get a Book for SEBLOD