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
Rahul456Rahul456 

How to set a input field required in my Page Editor based on some condition

Hi,
 
     I have two input fields in my VF page:
 
     1)1st input field is a Picklist(Which has values like:Text,Pick List,Multi-PickList,Radio Button)
     2)2nd one is Text Area.
 
     So User Selects either of Pick List,Multi-PickList,Radio Button values in 1st input field then Text Area is a Required Field.
 
     If User Selects Text Value in 1st input field then Text Area is not a Required field.
 
  
 
  Please suggest me how to fix this issue.
 
 
 
 
   Raj
Sam.arjSam.arj

It's not as hard as it seems to be. All you need is to check the value in your controller and properly view messages to your user.
click below there is very good example to address this issue:

http://salesforcesource.blogspot.com/2008/09/how-do-custom-validations-in-visual.html


mtbclimbermtbclimber
You might also want to read through this sample solution as it can be adapted to support your case I believe.