There are two tasks at hand:<br><br>Task A. Determining what fields should be used to store the data.<br>Task B. Configuring the form to have proper validation and dynamic behavior.<br><br>Task A. can be done via CCK alone. Task B would require custom PHP and JavaScript/jQuery to implement fully. <br>
<br>Here's how I would approach task A. There will be three fields total. <br><br>1. Create a field called "Type" (or whatever makes sense) which is 3 radio buttons.<br><br>o Age group<br>o All ages<br>o Skill-based<br>
<br>2. Create a field called "Ages" which is 5 checkboxes that states "If age group was selected for type, please select the appropriate age group(s)."<br><br>[ ] 4-5<br>[ ] 6-7<br>[ ] 8-9<br>[ ] 10-12<br>
[ ] 13+<br><br>3. Create a field called "Skills" which is a textfield that state "If skill-based was selected for type, please enter the relevant skills."<br><br>From here, you are faced with Task B. Some form validation would be added such that if indeed "Age group" or "Skill-based" are selected for "Type" that the respective sub-fields contain values. JavaScript/jQuery would hide the checkboxes and textfield if the respective radio button isn't selected.<br>
<br>Arguably, the form is acceptably functional without completing Task B -- that is, making sure correct data are entered becomes administrative (a human task) rather than technical (a machine task).<br><br><br><div class="gmail_quote">
On Sat, Nov 6, 2010 at 7:09 PM, Marty Landman <span dir="ltr"><<a href="mailto:mlandman@face2interface.com">mlandman@face2interface.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi, I've been asked if I can accomplish the following for a create<br>
content form where the content-type is CCK generated.<br>
<br>
Age group:<br>
<br>
1. 4-5<br>
2. 6-7<br>
3. 8-9<br>
4. 10-12<br>
5. 13+<br>
6. All ages<br>
7. Skill based ____________________________________________<br>
<br>
with the lines before the ages being a checkbox, and the ability to<br>
check multiple boxes. After "Skill based" we need a box to write in<br>
the skills. Is it possible to be able to check multiple boxes on the<br>
first 5, but if you check all ages or skill based you can only check one?<br>
<br>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
<br>
I'm thinking that at least conceptually if I could make 1.-5. into a<br>
checkbox group, and then have that checkbox group be in aggregate a<br>
radio button (if that even makes sense) with 6. & 7. also being radio<br>
buttons 2 & 3, and then the test field for skill based would<br>
magically become required iff #7 was selected.<br>
<br>
Anyone know of any examples of something like this being done? How<br>
would it be approached? Can it work with CCK? Alternatively I wonder<br>
how to get close to what they want. I mean from a functional pov this<br>
makes perfect sense, doesn't it?<br>
<br>
Marty<br>
<br>
--<br>
Open first 10 Google results in 10 new tabs<br>
<a href="https://addons.mozilla.org/af/firefox/addon/181910/" target="_blank">https://addons.mozilla.org/af/firefox/addon/181910/</a><br>
<font color="#888888"><br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br>