Hi Abu
I've looked through the documentation and support but wasn't able to find a solution. I would like to show or hide certain columns in the ADD/EDIT dialogue boxes based on the user's selection in a dropdownon the dialogue. Is this possible? Also if the user chooses a dropdown value I'd like to pre-populate certain values based upon the selection. So I'm wondering how much can the dialogue be modified once it is already opened.
Thanks
Hello,
All you need is to connect onchange event with dropdown, and do your changes using jquery.
e.g.
$col["editoptions"] = array("onchange" => "change_form(this)");
and in html ..
<script>
function change_form(o)
{
if (o.value == 'blabla')
{ … }
}
</script>
now this "…" could be your ajax call to load data and fill json output using jquery.
this could be jQuery("#tr_gender").hide() or .show()
Hope this would give you an idea.
Forgot to mention, you can inspect the textbox OR the <TR> table row id using firebug for change.
Hello Stephan,
I've emailed you one solution, another is to set:
$col["hidden"] = true;
$col["show"]["add"] = true;
$col["show"]["edit"] = true;