Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

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

Form with TinyMCE


Go to End


1798 Views

Avatar
roterl

Community Member, 44 Posts

26 January 2009 at 9:23am

Edited: 26/01/2009 9:30am

Hi
I would like to create a form the users may fill in with TinyMCE.
How can I do it?

	function Form() {
		return new Form($this, "Form", new FieldSet(
 
			// List your fields here
			new TextField("FirstName", "First name"),
			new TextField("Surname"),
			new EmailField("Email", "Email address"),
			new HtmlEditorField("Story", "Your story")
 
		), new FieldSet(
 
			// List the action buttons here
			new FormAction("SignupAction", "Sign up")
 
		), new RequiredFields("Email", "FirstName"
 
			// List the required fields here: "Email", "FirstName"
 
		));
	}

I add the RequiredFields into the Form object and the form include multi-line text field, but without the TinyMCE.

thanks,
Rotem.