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?
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.
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.
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.
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.
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 :)
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
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
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
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
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
Hi Anthony
As usual you're very welcome :-) Looking forward to hear if it works out for you.
/Jan
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
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
I have found a great article on this written by Thomas Stock:
Working with Umbraco Data Type prevalues in .NET User Controls
is working on a reply...