Did anyone make a custom datatype/radiobuttonlist where you can specify name and value. Need the value to be able to run statistic calculations against the entries.
I will reward the person that can help me on this!
If you take a look at the contour shared sourcecode you can see the source for the details radiobutton list fieldtype, it should be pretty easy to start from this and adjust it to your needs
1. Created a new fieldtype. Started of from RadioButtonList.cs from the shared sourcecode
2. Added a text input field for the value in the modal for editing prevalues(id="PreValueModal") that is found under /usercontrols/umbracoContour/EditForm.ascx
3. Changed in the umbracoforms.js. JQuery to add the value in the prevalues as the sting text=value
4. In fieldtype i split the text (text=value).split("=") and then use one as result[0] as the text and result[1] as the value.
This renders the form right and stores the entry with the value. The only thing i could not get to work yet is edit the entry.
Radiobutton list with name/value
Hi
Did anyone make a custom datatype/radiobuttonlist where you can specify name and value.
Need the value to be able to run statistic calculations against the entries.
I will reward the person that can help me on this!
Comment author was deleted
Hi Lars,
If you take a look at the contour shared sourcecode you can see the source for the details radiobutton list fieldtype, it should be pretty easy to start from this and adjust it to your needs
http://our.umbraco.org/projects/developer-tools/umbraco-contour-shared-source
Cheers,
Tim
Thanks Tim!
I managed to get one step closer.
Now i created a new fieldtype and added a field in the "PreValueModal" in EditForm.ascx.
How do i hook in that value to my new class with the new fieldtype?
/ br Lars
My tacky solution! :)
1. Created a new fieldtype. Started of from RadioButtonList.cs from the shared sourcecode
2. Added a text input field for the value in the modal for editing prevalues(id="PreValueModal") that is found under /usercontrols/umbracoContour/EditForm.ascx
3. Changed in the umbracoforms.js. JQuery to add the value in the prevalues as the sting text=value
4. In fieldtype i split the text (text=value).split("=") and then use one as result[0] as the text and result[1] as the value.
This renders the form right and stores the entry with the value. The only thing i could not get to work yet is edit the entry.
Does anyone have a better solution?
is working on a reply...