How to make in "DropDown" a single option value disabled (visible but non active)

weisgerber 30 May, 2017
I would like to ask You, if it is possible (in V5) in "DropDown" to make a single option value disabled, visible but non active and color it by different color, for example active option value by "green" and non active by "red".

Many thanks for Your answer.
With Best Regards,
jan Weisgerber
Max_admin 31 May, 2017
Hi Weisgerber,

The only way to do this is using a custom JavaScript in the form load event.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
weisgerber 04 Jun, 2017
Many thanks for Your answer, but I don´t understand very well. If I choose in ChronoForm functions "Events", there is Basic options, but no choice for "Custom JavaScript" isn´t there. And If I choose "Edit Elements Settings", there in "Events" tab and than "Validation" tab, there is only "Custom Funciton", no "Custom JavaScript". So, can You help me to tell the procedure step by step in ChronoForm?

Many thanks for Your other answer.
Best Regrads,
Jan Weisgerber
GreyHead 04 Jun, 2017
Hi Jan,

If I understand correctly you want this to happen when the form loads - so it is not a question about validation. You can add Custom JavaScript using the Load JavaScript action in the form Setup tab.

Bob
Max_admin 09 Jun, 2017
Hi,

In a "Custom JavaScript" action you can do this:

jQuery(document).ready(function($){
$('option[value="xyz"]').prop("disabled", true);
});


Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.