Quantcast
Viewing all articles
Browse latest Browse all 82152

Trying to show/hide different inputs based on editor action

Hi,

I'm having some trouble with editor's input fields. My current Editor instance (when doing a 'create') displays several selections to the user, and shows/hides more select boxes based on what they select. I accomplish this by hiding and showing with jQuery inside the editor.on('onOpen', function()){} . I tried to specify what is shown based on the action by saying if (editor.create) { //show & hide inputs }

then, else if (editor.edit) { //populate all current fields & show relevant select boxes, hide the rest }

I also tried saying if (editor.action === 'edit'){} , but that didn't work either. It is just displaying the fields I have for the 'create' logic no matter what. Is there a good way to display different 'fields' based on the user's action?

Thanks,
Carl

Viewing all articles
Browse latest Browse all 82152

Trending Articles