Pragmatically changing the value of a Editor element that is not on a Custom Template
Pragmatically changing the value of a Editor element that is not on a Custom Template

Hi,
I have some fields on my editor but they are not on my custom template.
What I need to do is populate these fields programmatically depending on certain selections, so my idea was after a certain visible field is changed I would use a javascript function to get the required data and simply update the value of the hidden field.
This works correctly if the field is not hidden, but as soon as I hide the fields the value is no longer updated and therefore not submitted.
So, I assume by having the fields hidden (not on the custom template) the DOM element does not exist, so therefore it is not updating, I'm guessing these hidden fields are stored in javascript or something?
Is it possible to manipulate the hidden fields value? If so, could you explain how please?
Ideally, I would like to update the value of the hidden field when the visible element is changed.
Thanks, Chris
This question has an accepted answers - jump to answer
Answers
Update***
I've tried adding the fields I want to be hidden to my custom template with an input type of hidden to try and force them to exist on the DOM, but that, unfortunately, did not work either
I'm sorry to say I'm not quite getting it. Can you link to a page showing the issue please? Are you saying you have fields inside the Editor form, which are not actually controlled by Editor? How are you submitting them to the server, regardless of whether they are hidden or not.
Allan
Hi Allan, I will pm you. Thks, Chris
Hi Allan, thank you for your offer of help, but I have found the solutions, just needed to use:
editor.hide('<<myfieldname>>');
Ta, Chris