Author Topic: How to require a file type field in a profile  (Read 861 times)

Offline michaels23

  • I post occasionally
  • **
  • Posts: 55
  • Karma: 1
How to require a file type field in a profile
« on: July 07, 2007, 04:59:00 pm »
Hi all,

I don't seem to have what it takes to figure out how to successfully require a file type field in a profile:

  • I created a custom field with field type = file and required = Y.
  • I created a profile to be used for both profile and search results.
  • I added the file field to the profile and, again, set required = Y.
  • I had no trouble uploading a file with the profile, however,
  • when I try to edit the contact with the profile, the input for the field is empty (the profile does correctly display the link to the file and to delete it). That doesn't bother me, but
  • if I Submit the profile without deleting the old and uploading a new file, I get a is a required field error.

That's a simple example that would be useless in practice, but I'd like users to be able to edit other fields in the profile without getting this error.

TIA for any suggestions.

Offline Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 14727
  • Karma: 440
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to require a file type field in a profile
« Reply #1 on: July 07, 2007, 09:42:02 pm »

Can u please reproduce this on http://sandbox.civicrm.org/ and if so, file an issue at http://issues.civicrm.org/

thanx

lobo
Found this reply helpful? Contribute NOW and help improve CiviCRM with the Make it Happen! initiative.