Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Custom CMSAction - HTMLText Fields Form Submit

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1182 Views
  • Matze0681
    Community Member
    25 Posts

    Custom CMSAction - HTMLText Fields Form Submit Link to this post

    hi everybody,

    i added a custom cms-action to a managed model in modelAdmin. (Add new button next to the standard Save,Back and Delete Button). Now i need to process the form in the extended ModelAdmin_RecordController (this is where the form action is). Everythig works like it should but HTMLText Fields from the DataObject...
    If i look into the $_REQUEST var every field appears with its correct values, but HTMLText Fields only contains the correct value if i saved the DataObject(ManagedModel) before i fire the CustomCMS Action.

    I can change field values from any other field and it works fine..($_REQUEST values are correct also without saving the object first)

    Is there a special behaiviour with the tinymce htmltext field and form submits ? somebody got the same problem before ?


  • PGiessler
    Community Member
    47 Posts

    Re: Custom CMSAction - HTMLText Fields Form Submit Link to this post

    Hi Matzeo681,

    that is right. There is a special behaviour of TinyMCE in the HTMLEditorField. TinyMCE generates an iframe and all input will be there.
    If you click the CMS_Save Action, a Javascript function will be execute. This function, called TinyMCE.triggerSave(), copy all the content of the iframe in the hidden textarea.


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.