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
rushrush 

Require Attachment On Account VF page

 

I have a basic Account page in Visualforce via Sites that creates an account.  I have the attachment tool as well up and running.  I am still trying to make the attachment required and as of yet have been unable to find anything specific on it.  Could anyone direct me to some information on this?

 

Much appreciated.

 

 

Navatar_DbSupNavatar_DbSup

Hi,

 

You can create a section for the attachment on the account vf page like the standard page and create a another page from which user upload the image like parent and child window and pass the id from the child window to the parent window in a hidden input text field .if the length of the a hidden input text field is zero you can display a error message through the JavaScript or apex:message befor save the record.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.