• A new version of Full Calendar is now available.

    See the details here

Show/hide button in list view

mirceat

Member
Hello,

I have a List with a php plugin enabled that will display a button for sending emails (run some code then send e-mail). The button is set to be visibile for a specific Joomla viewlevel but I need more, I need to show this button only if there is a specific value selected and saved for a dropdown field in form.

In short, how can I do the same as form_xx for list_xx to show/hide a button (not a column) based on another element value when the List load the rows? Or at least tell me how to get the value of an element in list_xx, I couldn't find any information in wiki or forum..

Thank you
 
Easiest way may be to hide the button with custom CSS.
If it's only one value (or only some values) of your dropdown field which should show the button I would
If it's relevant for security that the button doesn't do anything you must check also inside your php code because CSS (similar to JS) can always be manipulated by the user.

Or create a custom list template and modify default_headings.php and default_row.php for skipping the php button.
 
Thank you very much for help, I managed to hide the button ;) There is a part in php code that check if all conditions are meet and run the code, else redirect to main page.
 
Back
Top