change element parameters programmatically

susannanam

Member
hi all,

i would like to set "show in list" and "hidden" to yes or no, based on a selection that the customer does (by a radio button).
it is not about showing in the form while filling it in but the settings shall be done in the element setup so that whenever the list is opened, it shows accordingly.

the customer can at any time change those settings in the frontend by changing the choice of the radio buttons.

is that somehow possible?
thanks
susanne
 
Basically you can do it only by creating a separate group for settings within the same form. Then, in this group you can use for example a radiobutton element with some element javascript settings (this is the tool for hide/show etc other elements onload/onclick/...).
 
For list display you can also use the "Toggle columns" feature (in list Details/Filters).
 
hmm... toggle columns, good idea, can i toggle them programmatically? it has to happen automatically, based on the said setting that is stored in the table. so that every user can have a different setting and they need to see different columns when they open the list.
 
Basically you can do it only by creating a separate group for settings within the same form. Then, in this group you can use for example a radiobutton element with some element javascript settings (this is the tool for hide/show etc other elements onload/onclick/...).
i have used that before yes, but does it work in a list?
 
can i toggle them programmatically?
I don't know, it's JS.
I would use a custom list template, in default_row.php and default_headings.php something like
Code:
$skip-element1 = true/false....; (I don't know where you get your user-radio-elements from)
....
//inside the foreach:
if ($heading == 'full-element-name-to-skip1' && $skip-element1 ) {continue;}

In default_headings.php it's
if ($key == 'full-element-name-to-skip1'....
 
I don't know, it's JS.
I would use a custom list template, in default_row.php and default_headings.php something like
Code:
$skip-element1 = true/false....; (I don't know where you get your user-radio-elements from)
....
//inside the foreach:
if ($heading == 'full-element-name-to-skip1' && $skip-element1 ) {continue;}

In default_headings.php it's
if ($key == 'full-element-name-to-skip1'....

thanks troester, good idea... i have no clue about JS but i will play around and google and see how it goes :)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top