47 Posts
8 years ago

Hi seblod community and Happy New Year !! 

I want hide field in CONTENT VIEW according to an another field 

I use the plugin Code - BeforeRender 

ex: if field1== value1 then hide field2

I don't know how to hide field2 or how to change state of this field 

Thanks for your reply

Get a VIP membership
8 years ago
Level 1

Hi Zaliyanna,

You can do this natively with SEBLOD by using conditional states, see the link below.


47 Posts
8 years ago
Level 2

HI Seb, 

Thanks for your reply , 

I use already this in form view and it works fine

but in a content view I can't use triggers... 

for ex: I have an btn_apply in the content view 

and I want hide this button once the date for the application ends 

so I have :

if (date_of_application > end_date) { hide btn_apply } else the btn is shown

Maybe it's possible to act from the form view but I didn't see how....

8 years ago
Level 3

Hi Zaliyanna,

Thanks for your answer.

Yes :-)! Welcome to the "Restriction Plugin" concept.

Restriction plugin are used for that, to restrict the display of value (content view) in relation with some rules.

Example, the language restriction plugin is used to display a value of a field only if the current user language match a define language 

Your need is very closed from the Field Restriction Plugin http://www.seblod.com/products/19160 . But it's not enough, it's not working for date and don't manage a comparaison between 2 fields.

The solution should be to create your own Restriction Plugin.

See full list of restriction plugins here http://www.seblod.com/products?seb_item_category=112


47 Posts
8 years ago
Level 4

Thank you for your reply, Restriction plugin concept works fine ... you really made Seblod flexible ...If I manage to do I send it to you

Get a VIP membership