• Holiday Schedule

    Your code gophers will be away for the next couple of weeks so support will be sporadic. We should be fully back online by the end of September.

  • A new version of Full Calendar is now available.

    See the details here

Conditional PHP list plugin

jo-ka

Member
Hello.
Is there a way do conditionally display the PHP list icon on a list, based on a query?
This is, if the season is 2017/2018 don't display the icon.

View attachment 17082

Thanks in advance.
 
If it's related to an element with only some defined distinct values you can hide the button with CSS (set your season element to "use as row class").
But this won't prevent the user to check the box and use the button in the table header.
So it may be necessary to test the condition also in your php code if it should not be run for such rows.
 
Huuummmmm.

So, probably the best way is to have some JS code which will avoid the script to run under certain condition, for example, if season = 2017/2018 the PHP code is not run and a message is displayed like "You are already on the active season"...

Is this possible?
 
As the tooltip on the js code says, you can return false to abort the submission, and the selected row data is in the variable array 'rows'. So as long as the element you need to check is displayed in the list, it should be possible to check the rows array and return true or false.

-- hugh
 

Members online

No members online now.
Back
Top