function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NakataNakata 

How to detect multiple similar checkbox input ?

Good day, 

 

I need to build a VF page which contain many records and each record indicate a field that have multiple checkbox which allow user to select whether the field should be enable or disable, and it should be required or not.

 

My question is what is the best approach to accept all field's input ?

 

Scenario

========

FieldNameisRequired isEnabled

------------------------------------------------

Field1 ticknot tick

Field2not ticktick

 

Appreciated your guidance and Thanks in advance !

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

This sounds like a job for wrapper classes.

 

In this case you'd have a custom class that wraps the record, the required checkbox and the enabled checkbox. 

 

Here's a wiki post for this:

 

http://wiki.developerforce.com/index.php/Wrapper_Class

All Answers

bob_buzzardbob_buzzard

This sounds like a job for wrapper classes.

 

In this case you'd have a custom class that wraps the record, the required checkbox and the enabled checkbox. 

 

Here's a wiki post for this:

 

http://wiki.developerforce.com/index.php/Wrapper_Class

This was selected as the best answer
NakataNakata

Thanks for the clue Bob !

 

I also looking for single form with multiple tab, please share with me if you have any idea. Thanks in advance !

 

 

bob_buzzardbob_buzzard

Can you clarify what you mean by multiple tab?  E.g. is that using the tabpanel standard component?

NakataNakata

Hi Bob, 

 

I'm not familiar with multi-tab component that commonly use in SFDC, what i want to achieve is to have a form which contain multiple tab and each tab have it own fields, this form like a wizard which have next and previous button allow user to go tab by tab by ticking the checkbox which act like a compoennt to enable/disable the field visibility. and these setting will in fact a control to another data entry form's field visibility.

 

bob_buzzardbob_buzzard

If it were me I'd do it through a wizard rather than rerendering sections of the page - I find that users can get confused about what pages should look like when they morph and often think they are in the wrong place.

 

There's a good example of creating a wizard in the Visualforce Developer's Guide:

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_wizard.htm