Hi everyone
i need one select field1 on CC, that can change of options when field2=1 or field2=2
when field2=1
1=option1
2=option2
3=option3
and when field2=2
4=option4
5=option5
6=option6
I have got one select field using "fields" area
but i don't know if posible change select options based on field2, I tried with php code without sucess
please let me know if possible
i need one select field1 on CC, that can change of options when field2=1 or field2=2
when field2=1
1=option1
2=option2
3=option3
and when field2=2
4=option4
5=option5
6=option6
I have got one select field using "fields" area
model.field1:<select name="model[{model.id}][field1]" class="form-control A" ><option value="{model.field1}">{model.field1}</option><option value="0">None</option><option value="1">opt one</option>.........</select>
but i don't know if posible change select options based on field2, I tried with php code without sucess
please let me know if possible
I solved it, it was an issue with quotation marks
this code works on php area
this code works on php area
paper.sesion:return ($row['paper']['poster']=="1") ? "<select name='paper[{paper.id}][sesion]' class='form-control A'><option value='{paper.sesion}'>{paper.sesion}</option><option value='1'>oral</option></select>" :"<select name='paper[{paper.id}][sesion]' class='form-control A'><option value='{paper.sesion}'>{paper.sesion}</option><option value='1'>poster</option></select>";
This topic is locked and no more replies can be posted.