how to use dependent set a value
how to use dependent set a value
tomcat_nz@hotmail.com
Posts: 11Questions: 4Answers: 0
in Editor
editor1.dependent( 'option', function ( val )
{
if (val === 'value1' || val === 'value2')
{
return {show: ['field1', 'field2', 'field3']};
}
else
{
return {hide: ['field1', 'field2', 'field3']};
}
} );
in the code above I need to set a specific value to field1 how can I do?
Sam
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
More information I mean the value of field1 can vary on the value of option.
Sam
Hi Sam,
You can set the value of a field using the
values`` option in the returned JSON object as described in the
e-api dependent()` documentation. e.g.:Allan
Thanks it helps me understand how to use code.
Your guide is very usefull I can solve my problem with these part of code. But in case of select (have multiple values) how to set of hide some values in select. Please guide me. Thanks