Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Smith.B 8 posts 99 karma points
    Jan 30, 2018 @ 08:41
    Smith.B
    0

    Rich Text Editor - field value

    Hi,

    my colleague use the Rich Text Editor to create user registration form as below

    enter image description here

    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,

  • Alex Skrypnyk 6169 posts 24160 karma points MVP 8x admin c-trib
    Jan 30, 2018 @ 13:07
    Alex Skrypnyk
    0

    Hi Smith

    Can you have a look at source code of this RTE?

    Is there an action url what handles request?

    Alex

  • Smith.B 8 posts 99 karma points
    Jan 31, 2018 @ 04:31
    Smith.B
    0

    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.

  • Steve Morgan 1349 posts 4458 karma points c-trib
    Jan 31, 2018 @ 08:29
    Steve Morgan
    100

    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

  • Smith.B 8 posts 99 karma points
    Jan 31, 2018 @ 13:10
    Smith.B
    0

    Thanks Steve, will change to Model and SurfaceController for above case.

Please Sign in or register to post replies

Write your reply to:

Draft