Creating optional groups of required fields

5 posts by 3 authors in: Forums > CMS Builder
Last Post: February 8, 2010   (RSS)

By gkornbluth - February 3, 2010

Hi all,

I'm not sure that I can explain this correctly, but here's what I'm trying to do.

I have a number of fields in a multi-record editor that's used to enter event information for an organization.

Because the section is multi-purpose, some of the fields are required fields for some of the purposes (a minimum enrollment field that's required to determine if a lecture will be presented), and those same fields should not be required for other purposes (minimum enrollment has no meaning when dealing with a non-enrollment event.)

Is there a way based on a pull down menu selection, that a user can be selectively required to enter data in a differing group of required fields?

Sorry if this is confusing.

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Creating optional groups of required fields

By Chris - February 5, 2010 - edited: February 5, 2010

Hi Jerry,

This isn't currently possible in CMS Builder; however, we can definitely custom build this kind of thing.

One approach would be to include instructions on the page explaining which fields need to be filled in. Another approach would be to use separate sections for different event types. A third alternative would be to build a custom form outside of CMS Builder for entering these records.

I hope this helps.
All the best,
Chris

Re: [chris] Creating optional groups of required fields

By gkornbluth - February 5, 2010 - edited: February 5, 2010

Thanks Chris,

I wanted to keep this inside CMSB because of the built in security features, like Login, access to specific sections, etc. but the custom form idea sounds interesting as a temporary measure.

I still don't really understand how to accomplish this. Or to incorporate the concepts in my other post, Collapsible groups of fields in section editor #77606

Could you point me in the right direction.

Best,

Jerry Kornbluth

PS I'd still like to see more emphasis placed on the user end of things now that the developer and admin are pretty flexible.
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Creating optional groups of required fields

By Dave - February 8, 2010

Hi Jerry,

I've attached a sample plugin that does this.

The example code should point you in the right direction. You'll still need to figure out all the logic though. For your specific fields.

The example plugin checks a cost and title field and requires different title lengths for costs below or above a dollar.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com