CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Add Upload Field?
Pages: [1]

Author Topic: Add Upload Field?  (Read 2685 times)

obsreq

  • Guest
Add Upload Field?
November 06, 2009, 09:40:24 am
I'm using a profile for registering for an event.  I'd like to be able to have users be able to upload a file from the registration page as well (Credentials such as a vcard or another filetype).  When trying to add a new field to the profile, I don't see an upload option.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add Upload Field?
November 06, 2009, 09:41:26 am

1. create a custom field of type File

2. add this custom field to your profile

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

obsreq

  • Guest
Re: Add Upload Field?
November 09, 2009, 08:30:05 am
Admin CiviCRM -> Custom Add - > Add  ... make a file field, name it, etc.

...then what?  I go to the profile and add a field, but my field isn't among those available.  What are the proper steps?  I can' find anything on Google.

obsreq

  • Guest
Re: Add Upload Field?
November 09, 2009, 10:20:13 am
Figured it out, thanks!

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Re: Add Upload Field?
November 09, 2009, 12:33:44 pm
Lobo, can you confirm this works EXCEPT when the profile is use for (drupal) user-account profile-page?
I yes can you also elaborate why there's a difference between a normal profile and one used as a drupal-user-profile-page.
Regards Joop

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Add Upload Field?
November 09, 2009, 12:51:12 pm

hey joop:

yes, confirming that :)

the big difference is that in the drupal page drupal controls the form and the form action. it passes control to us via the drupal user hook

in civicrm profiles, we control the form action and get control once the form is submitted

that said, i do think that with drupal 6 and the form alter hooks you might be able to alter the form to make it of type multipart/form-data (which is what u need to enable upload on a form). its a matter of someone who knows drupal / form api / civicrm well enough to step up and do the needed work

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Re: Add Upload Field?
November 10, 2009, 09:44:15 am
So I guess it should't be too dificult to either:

1. Alter the widget to a jQuery file upload type, or
2. Multi-step the form to allow the upload.

I try this in a drupal-module and come back here if I succeed.
(I will also comeback if I don't   ;D)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Add Upload Field?

This forum was archived on 2017-11-26.