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
Kirtesh_JainKirtesh_Jain 

How I can mark Input file tag as Required when submiiting form

Hi ,

 

I found that required attribute doesn't work with <apex:inputFile />.

 

I want to put error Message for it to User. I dont want to use javascript as on page other 

fields are also with required attribute. I want to Sync all Error Messages on Page when submitting 

Submit button. 

 

Other way is to use Apex function to show Message.But I think it is not solution which i want.

 

Your help will be most appreciated.

 

 

 

Thanks,

Kirtesh

imuinoimuino

 

There is a required attribute for this field:

requiredjava://java.lang.BooleanA Boolean value that specifies whether this component is a required field. If set to true, the user must specify a value for this component. If not selected, this value defaults to false.

 since it is a java.lang.Boolean you may need to write its value in capital letters.

Here is a link, its very useful, contains the reference for all the apex tags.

Just look for the fileinput tag on the left sidebar to see all its attributes.

https://na7.salesforce.com/apexpages/apexcomponents.apexp

Kirtesh_JainKirtesh_Jain

I know already that required attribute is given for input file.but it is not working..

 

you did practical with it .

 

Thanks for reply.

 

 

Kirtesh