Field type referring to all values of another section
4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 16, 2014 (RSS)
By maister - June 2, 2014
Is there a way to solve following in the section editor of CMSB?
Suppose that I have 2 sections (tables): "products" (= multi record menu-type) and "orders" (= also multi record menu-type).
I want to add a field type in the "orders" section that does following: it lists the names of the "products" and besides I can enter a value (in a textfield for example).
In that case, if an admin "creates" an new order in CMSB (s)he gets a overview of all the products an can enter manually a comment besides every product.
I didn't find a corresponding topic about this. If there's one: sorry for the duplicated topic.
Thanks for all feedback!
Regards
(to be clear: this case is not specifiek for a (web)shop, but it was the easiest way to explain it)
By claire - June 13, 2014
Hi Kristof
Sorry for the late reply. Can I just confirm - you're talking about two separate fields here? It's not possible to create just one that lists the names and also allows you to record a comment.
If you mean two fields, I can explain how that works.
Claire Ryan
interactivetools.com
Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
By maister - June 14, 2014
Hi Claire,
I mean a FieldType that permits me to choose a product that was created in another section (for example, by a list that displays me al the options) and therby I can add a comment (in a textfield for example).
There are maybe some different workaround or another solution that does what I want ... so shoot.
Regards.
By claire - June 16, 2014
Hi Kristof
The easiest way to do this is add a list type field. See the info here: http://www.interactivetools.com/docs/cmsbuilder/field_list.html
Create your field, choose the list type, then look at this option: Get options from database (advanced)
That will let you choose the table to get the info from, then set the option value (usually the row number, a.k.a. num) and the option label (usually the name). The default list is a dropdown, if I recall right, but you can change it if you need to.
Then you just add the text area underneath it for the comment and you're done.
Does this sound like what you're looking for?
Claire Ryan
interactivetools.com
Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/