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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Standalone Profile and Anonymous user questions
Pages: [1]

Author Topic: Standalone Profile and Anonymous user questions  (Read 4920 times)

jfulton

  • Guest
Standalone Profile and Anonymous user questions
May 05, 2007, 04:04:41 pm
I'm using CiviCRM 1.4 w/ Drupal 4.7 and am trying to create two forms to
take information from anonymous users; an email list sign up form and a
literature request form.  These anonymous users will not be creating an
"account" to log into the site with.  Two questions:

Because I'd like to style these forms and hide some of the form inputs,
I want to use standalone profile forms.  Once the form is submitted, if
required fields aren't filled out, it reverts to the /civicrm/profile
form rather than the standalone.  Is there a way you can handle the
checking on the standalone form other than client side javascript?  Or
at least be bounced back to the standalone form and grab some info
through PHP or URL argument that I can use to create an error message?

I saw in the 2.0 Candidate Features doc, it says 'Provide alternative
processes for handling the "contact already exists" case when an
anonymous user is adding their contact information using a Profile
form.'  Does this mean that currently an anonymous user simply won't be
able to fill out these two profile forms using the same email address? 
Or is there a current work around for this and if so, can you point me
to it.

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Standalone Profile and Anonymous user questions
May 06, 2007, 12:13:09 am

John:

you should think of upgrading to civicrm 1.7 and drupal 5.x to take advantage of some cool and great features.

however this still does not solve your current issue of the form being displayed when an error is present. There is no clean simple solution for this that we can think of. Would be great if you could check out the code and figure out and contribute a patch that makes sense and works for you (and is applicable to civicrm etc)
« Last Edit: May 06, 2007, 12:39:24 am by Donald Lobo »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Standalone Profile and Anonymous user questions
May 06, 2007, 08:28:42 am
Quote from: jfulton on May 05, 2007, 04:04:41 pm
Because I'd like to style these forms and hide some of the form inputs,
I want to use standalone profile forms.  Once the form is submitted, if
required fields aren't filled out, it reverts to the /civicrm/profile
form rather than the standalone.  Is there a way you can handle the
checking on the standalone form other than client side javascript?  Or
at least be bounced back to the standalone form and grab some info
through PHP or URL argument that I can use to create an error message?

John - Depending on what version of CiviCRM you are using, I think you can make use of an "undocumented" feature of Profiles which is to pass an "errorURL" value as a hidden field (similiarly to the cancelURL and postURL that are included automatically in the standalone HTML). Based on a quick look at the code in CRM/Profile/Form/Edit.php - we will pass you the error messages as msg=$message when redirecting to your custom error page. Give it a try and tell us how it works for you.

Quote from: jfulton on May 05, 2007, 04:04:41 pm
I saw in the 2.0 Candidate Features doc, it says 'Provide alternative
processes for handling the "contact already exists" case when an
anonymous user is adding their contact information using a Profile
form.'  Does this mean that currently an anonymous user simply won't be
able to fill out these two profile forms using the same email address? 
Or is there a current work around for this and if so, can you point me
to it.

As of 1.7, there is a Profile Setting (under Advanced Settings for each profile) - which you can enable to tell CiviCRM to "update on duplicate match". With this setting enabled - when a contact posts to multiple forms with "matching" contact values - their contact record is updated. (Matching requires that the form includes your Duplicate Match criteria fields -e.g. First Name, Last Name, Email using the default dupe matching.)
Protect your investment in CiviCRM by  becoming a Member!

jfulton

  • Guest
Re: Standalone Profile and Anonymous user questions
May 08, 2007, 03:23:54 pm
Thanks Dave for the tips...

New problem, hope you'll be familiar with.  In 1.4 I had some Custom Data fields that were being included into a Profile.  I sucessfully updated to 1.7 and now when I go to my view the Standalone form for my Profile i get the following error:

"Sorry. A non-recoverable error has occurred.

This profile is not configured for the requested action. Contact the site administrator if you need assistance."

Also, when i Preview the Profile, I don't see any of the custom data fields.  As well, I don't have any custom data fields available to me when creating new fields in the Profile.  They just aren't in the pulldown.

Any ideas on how to use custom data in Profiles in 1.7?  Or if this is a bug with upgrading?

ps. I just read the previous question in the forum about custom data Groups not showing up in the Profile form... this is not the case with my situation.  The custom data fields themselves aren't showing up.
« Last Edit: May 08, 2007, 03:26:46 pm by jfulton »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Standalone Profile and Anonymous user questions
May 08, 2007, 03:52:55 pm
For your first issue - check the "Settings" for your Profile and make sure the
Used For: 
  • Profile


.. field is checked. This field must be checked in 1.7 if you're using the Profile as a Standalone Form.

Custom fields SHOULD be available for selection when creating a new Profile Field. I assume that you first viewed the Custom Data admin screens and verified that the Custom Fields are there... Also, for contacts who have custom field data populated - do you see the field / data when viewing the contact records ??
Protect your investment in CiviCRM by  becoming a Member!

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: Standalone Profile and Anonymous user questions
May 08, 2007, 04:20:44 pm

John:

Make sure you enable the permission "access all custom data" in your drupal permissioning page for anonymous / authenticated users (depending on who profiles are exposed to)

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

jfulton

  • Guest
Re: Standalone Profile and Anonymous user questions
May 11, 2007, 12:03:47 pm
Thanks Dave and Lobo, now the forms are working in 1.7 like a charm w/ custom errorURL, postURL and cancelURL.  However I have one last hurdle:

Even though I've checked Match "update on duplicate match" in the advanced section of each Profile of my two forms, I get duplicates when I enter the same data in two different forms.  I'm wondering if the "update on duplicate match" works in standalone forms?  I don't see a difference in Standalone forms whether Match is checked or not... so I'm thinking it should work at a deeper level.

I've also altered Duplicate Matching to match on Email only. But no dice.

Any ideas? I can get you access if needed.  Thanks.



Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Standalone Profile and Anonymous user questions
May 11, 2007, 03:18:42 pm
As far as I know, the "Update on Duplicate Match" should work on Standalone Forms. You could verify if this is the issue by testing your same case with the same 2 profiles - but invoking them via civicrm URL ( e.g. http://yoursite.org/.../civicrm/profiie/create?reset=1&gid=N ) while NOT logged in to Drupal.

If the "bug" recreates - then the next step would be to setup the same profiles on our demo site and see if it recreates there. If so, file an issue w/ details.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Standalone Profile and Anonymous user questions

This forum was archived on 2017-11-26.