47 Posts
zaliyanna
9 years ago
Topic

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 Book for SEBLOD
9 years ago
3
Level 1

Hi Zaliyanna,

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

Thanks.

47 Posts
zaliyanna
9 years ago
2
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....

9 years ago
1
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

Thanks.

47 Posts
zaliyanna
9 years ago
0
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 Book for SEBLOD