Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 24, 2014 @ 15:43
    Ismail Mayat
    0

    FieldType.RadioButtonList extra attributes processing

    So what i have is prevalue source which is bunch of umbraco nodes. Each of these nodes has some data namely media picker with images. I have created my own view/form/FieldType.RadioButtonList the code for it looks like

    <input data-val-defaultImage="@industryStandardImg" data-val-userAnswerImage="@GetImage(pv.Id)" type="radio" name="@Model.Id" id="@string.Concat(Model.Id,"_",pv.Id)" value="@pv.Value" 
    

    The extra data attributes correspond to some images userAnswerImage is the image set on the answer node which is a source for the prevalues. The defaultImage is image set on the parent question node.

    This all works fine and form renders no problem. So what I need to do is the following, after submitting the form on my thank you page i need to get the values on the attributes for the selected radios. Is there a way for me to do that maybe query post object? I need these values because on the thank you page depending on answers selected we will show bunch of images. Or do I hijack a route? Any ideas?

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 24, 2014 @ 16:17
    Ismail Mayat
    0

    So in answer to my own question KISS (keep it simple stupid). So I have updated the value field to use pv.Id which is the node id. That gets posted to my thankyou page and I can get the ids there and then get any additional data i need.

    Result!!

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jan 24, 2014 @ 17:17
    Tim Geyssens
    0

    Great :)

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jan 24, 2014 @ 17:18
    Tim Geyssens
    0

    If it wasn't the id, the recordid also get's posted so you could fetch it from that :)

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jan 24, 2014 @ 17:20
    Ismail Mayat
    0

    Tim,

    The record id will give me text of selected answers or will that also have node ids?

    Regards

    Ismail

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Jan 24, 2014 @ 17:21
    Tim Geyssens
    0

    Ah yes will be text instead :) but yeah then you could fetch id with that value, but just passing id is indeed simpler

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies