Copied to clipboard

Flag this post as spam?

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


  • Amigo 243 posts 568 karma points
    Sep 16, 2010 @ 14:28
    Amigo
    0

    content radiobutton select

    I would like to create a function where the webadministrator (when creating content on a site) can choose "image" og "text" in a radiobutton list.
    If "image" is selected a mediaselector shows up, if "textstring"  is selected a textstring shows up....
    How can i do that?

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Sep 16, 2010 @ 14:34
    Nik Wahlberg
    0

    Your best bet would probably be a custom data type (through your own user control). Short of that, you may also consider creating different containers in your tree that allows for separate document types (which in turn contain the data types of media picker or textstring respectively). 

    In what context are you trying to provide this functionality? Please provide further details. 

    Thanks,
    Nik

  • Amigo 243 posts 568 karma points
    Sep 16, 2010 @ 14:50
    Amigo
    0

    its on a document type with:

    1/ headline:textstring
    2/ content:editor
    3/ here my chooser will show

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Sep 16, 2010 @ 15:02
    Nik Wahlberg
    0

    Ok, in that case you'll need to have your custom data type in the form of a .Net user control. For your purposes, leveraging the user control wrapper will be ideal. Check out this article by Nibble on the topic.

    http://www.nibble.be/?p=24

    In your case, you're going to want to set that 'umbracoValue' to either the media chooser node ID or the text string depending on the selected radio button. This should get you started.

    If you have additional questions as you go, feel free to post away :) 

    -- Nik

Please Sign in or register to post replies

Write your reply to:

Draft