-1

I'm working on a custom joomla module. It has a form with an "editor" type field. The fields are defined in the related xml file:

<form>
    <fields name="main">
        <fieldset name="basic">
            ...
            <field
                name="Message"
                type="editor"
                label="Message"
                filter="safehtml"
                readonly="true"
            />
        </fieldset>
    </fields>
</form> 

When I press the button to submit the form all other form fields are properly submitted, but not the editor field.

I checked that if I change the field type to "textarea", the text gets posted correctly. So it must be something with the editor field type.

What do I need to do to be able to submit the text entered into the editor field?

Thanks a lot, W.

1

Are you sure that you want to set the editor field type to readonly='true' ? Maybe it's just a mistake. I do not see the logic behind that. That way you could not really edit and submit anything via the editor.

In Joomla documentation there is no possible attribute of readonly to editor field type. Link to doc: https://docs.joomla.org/Editor_form_field_type

  • My module prefills the field and in this case it is only for review for the user. Some other users will be able to edit it too (in that case i will need to remove the read-only of course). – wanderlusted Oct 13 '18 at 19:10
  • Is the Form submitting without the readonly attribute in this form field? – Zollie Oct 13 '18 at 19:13
  • I just tried and it does. So that was basically the problem, thanks for the hint. What is really strange that the other field types are submitting even with the read-only property set to true... Thanks again! – wanderlusted Oct 13 '18 at 19:20
  • ...just for an addition to the question, maybe for your intended purpose, you can set the editor buttons to false, if you do not want to solve this task otherwise. So you can insert buttons="false" attribute for this field . – Zollie Oct 14 '18 at 6:20

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.