Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @return Form
- */
- public function AnonApplicationForm() {
- /*...*/
- if($this->getCurrentJob()){
- if($this->getCurrentJob()->IncludeProfileImage == 1){
- $profileImage = new FileField('ProfileImage', 'Profile Image');
- $profileImage->setFolderName('Uploads/Job/Profile');
- $profileImage->addExtraClass('form-control');
- $validator->addRequiredField('ProfileImage');
- }else{
- $profileImage = new HiddenField('ProfileImage', '');
- }
- }else{
- $profileImage = new HiddenField('ProfileImage', '');
- }
- $fields = new FieldList(
- $profileImage
- );
- /*...*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement