Changing field type in editor depending on row dada
Changing field type in editor depending on row dada
Hi! I'm currently trying to create a questionnaire in a form of a table with columns 'question','answer_type'(invisible column) ,'answer'. I would like to use Editor in inline mode for that task.
Is there any way to change type of the field 'answer' depending on value of field 'answer_type' (e.g. from select with yes/no options to textarea)?
Of course I understand that this will require some customisations from me, so i'm looking not for a ready-made solution but for a general directions.
Thanks in advance/
Replies
You will want to make use of
clear()
andadd()
right before you calleditor.inline()
.Example code:
I hope this gets you in the right direction.
Thank you for the advise and example.