my colleague use the Rich Text Editor to create user registration form as below
what i need to do is read the value key in by user and use a controller to post it to my API Server, can some one guide me on this ? I don't know how to start.
I'd recommend using Umbraco Forms if you need flexibility for editors to be able to create new forms and drop them in places. It's pretty cheap and editors like it.
If you want users to be able to create and edit forms within RTEs and be able to modify them at will you're in a much more difficult place.
You'd need a generic Surface Controller that allows for a flexible number of values to be posted to it (with different html types - e.g. drop downs etc) and does "something" with them. I suspect it might be possible if you're just creating a json string or emailing the data on) though I've never done it. For that to work you'd need the editor to be able to modify the source in the RTE to change where the form is posted to to your generic surface controller. I think you'd be opening a can of worms there though.
Rich Text Editor - field value
Hi,
my colleague use the Rich Text Editor to create user registration form as below
what i need to do is read the value key in by user and use a controller to post it to my API Server, can some one guide me on this ? I don't know how to start.
Thanks in advance,
Hi Smith
Can you have a look at source code of this RTE?
Is there an action url what handles request?
Alex
Hi Alex,
check the source, there is a button at the bottom :
since my colleague only in charge for design, so he don't put in any action into it. I can modify the source what i want, please help. Thanks.
Hi Smith,
If you want a form that looks exactly like the above then you'll probably need to rebuild it using a Surface Controller. You'll create a partial view with that form and a matching model etc to handle the data. See https://our.umbraco.org/documentation/reference/routing/surface-controllers
I'd recommend using Umbraco Forms if you need flexibility for editors to be able to create new forms and drop them in places. It's pretty cheap and editors like it.
If you want users to be able to create and edit forms within RTEs and be able to modify them at will you're in a much more difficult place.
You'd need a generic Surface Controller that allows for a flexible number of values to be posted to it (with different html types - e.g. drop downs etc) and does "something" with them. I suspect it might be possible if you're just creating a json string or emailing the data on) though I've never done it. For that to work you'd need the editor to be able to modify the source in the RTE to change where the form is posted to to your generic surface controller. I think you'd be opening a can of worms there though.
Steve
Thanks Steve, will change to Model and SurfaceController for above case.
is working on a reply...