Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Feb 15, 2011 @ 14:35
    Anthony Candaele
    0

    using checkbox list datatype

    Hi,

    For a contact form I need to create a property that's using a checkbox list datatype so that I can Implement the question:

    "What are your interested in?"

    .. Tailor Made Software
    .. Rapid Application Development
    .. OM Shell Reseller

    I never used the checkbox list datatype, so I'm a bit confused because I can only choose the datatype checkbox list, but I don't know how I can insert the values of the checkbox list.

    Is there any place I can find information on the usage of the checkbox list datatype?

    Thanks for your help,

    Anthony Candaele
    Belgium

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 15, 2011 @ 15:23
    Jan Skovgaard
    0

    Hi Anthony

    Is the form rendered based on a document type in the Umbraco content tree? Or is data going to be received on a node in Umbraco? Or is the form content just going to be sent to an e-mail?

    I'm trying to get an idea whether or not you actually need to use the datatype. So if you can describe your form project a bit more I think I can provide with a better suggestion for a solution.

    But in short you need to populate the datatype with the possible values to select from. But when used in a node it's the selected value you'll get when creating a XSLT macro for instance.

    /Jan

  • Anthony Candaele 1197 posts 2049 karma points
    Feb 15, 2011 @ 15:37
    Anthony Candaele
    0

    Hi Jan,

    I have a document type 'Flexisle Contact Page'

    This is a contact page that the user can fill in and send to an email address.

    Input fields on the contact form are: name, e-mail and message.

    My contact form works, but I need to add two more questions on the form: "what are you interested in?" and "software for".

    Both questions need to be implemented as checkbox lists. You can view the orgininal contact form on this website:

    http://www.flexisle.be/#p=Contact

    My implementation of the website in Umbraco is here:

    http://195.130.154.107/

    I have tried creating a datatype 'Interest' of control type checkbox list and setting the values for this datatype, but this datatype is only visible in the document tree, and not in the rendered contact form in the browser.

    thanks for your help,
    Anthony

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 15, 2011 @ 21:55
    Jan Skovgaard
    0

    Hi Anthony

    I think that you might benefit from using a "dropdown multiple" datatype in Umbraco, where you can add the needed prevalues and then mark all those values you need for your specific form.

    Then using your XSLT or C# code or whatever you generate the list of checkboxes you need in your HTML form.

    Does this make sense to you?

    /Jan

  • Anthony Candaele 1197 posts 2049 karma points
    Feb 16, 2011 @ 19:25
    Anthony Candaele
    0

    Hi Jan,

    This defenitely makes sense! Yesterday I already figured out I needed to adjust the web user control, but I was looking also for a way to enable the administrator to set the values of the checkbox list. I'll try out your suggestion and let you know if it worked.

    Thanks for the advice,

    Anthony

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 16, 2011 @ 19:39
    Jan Skovgaard
    0

    Hi Anthony

    As usual you're very welcome :-) Looking forward to hear if it works out for you.

    /Jan

  • Anthony Candaele 1197 posts 2049 karma points
    Feb 16, 2011 @ 20:03
    Anthony Candaele
    0

    Hi Jan,

    Any idea how I can access from my usercontrol the values that where set in the dropdownlist multiple datatype?

    In my usercontrol I have code to access the value of a string datatype like this:

    _nameLabel.Text = GetPropertyFromAlias("contactNameLabel");

    But I don't know how to programmaticaly access from my usercontrol the values that were set in a dropdownlist multiple datatype

    Thanks for your help,

    Anthony

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 16, 2011 @ 20:15
    Jan Skovgaard
    0

    Hi Anthony

    I'm a bit lost there...If id had been XSLT I would be able to help you out but I'm not that great with C# unfortunately :-/ Maybe others have an idea for you :)

    /Jan

  • Anthony Candaele 1197 posts 2049 karma points
    Feb 16, 2011 @ 20:24
    Anthony Candaele
    1

    I have found a great article on this written by Thomas Stock:

    Working with Umbraco Data Type prevalues in .NET User Controls

Please Sign in or register to post replies

Write your reply to:

Draft