I'm working a custom Joomla module that has a JForm with an editor field. My users use this form to edit and send some email messages to our customers. The field is prefilled by the system with some template content including an URL to another form:
At the same time <A href="https://$servername/en/tour-preferences?tid=$tour_id">please fill in this questionnaire</A>.
$servername is previously set to "myserver.com". When the user submits the form, the system retrieves the text from the editor field using the below code:
$fields = $input->get('main', array(), 'raw');
However if I dump all the fields I see that the "https://myserver.com" part of the text is removed from the string, so the link is broken. I checked that the link was properly prefilled into the editor field:
<a href="https://dev.gonativeguide.com/en/tour-preferences?tid=121" data-mce-href="en/tour-preferences?tid=121">please fill in this questionnaire</a>
I have no idea where this data-mce_href tag comes from. Could that cause this issue?
Previously I used the "safehtml" filter in my form definition, now I set that to "raw", but it did not help:
<field
name="Message"
type="editor"
label="Message"
rows="10"
cols="40"
filter="raw"
class="gngcontact"
/>
Please advise what should I do to really get the raw text from the editor field including the full url in my achor tag.
Important update: I replaced the editor field with simple textarea and the problem does not occur. So it seems to be somehow reated to the editor field type.
Many thanks!