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) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • from a short form to a longer form that's partially pre-filled
Pages: [1]

Author Topic: from a short form to a longer form that's partially pre-filled  (Read 1300 times)

julianjohannesen

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
from a short form to a longer form that's partially pre-filled
October 18, 2011, 01:37:24 pm
Does anyone know how I can create a newsletter sign up form that allows someone to enter their email address in a box on the homepage and then hit "enter" and be taken to a longer form, where they see their email address pre-filled?

josue

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
    • PTP
  • CiviCRM version: 3.4.4, 4.1.1
  • CMS version: Drupal 6.24, Drupal 7.12
  • MySQL version: 5.0
  • PHP version: 5.2
Re: from a short form to a longer form that's partially pre-filled
October 21, 2011, 09:28:34 am
we have been talking about this at PTP. our use case starts with a profile's html snippet that is on the group's website. this website is separate from the civicrm database site.

someone submits the form, via the snippet, and the user gets sent to the civicrm site, to a form that has whatever was entered into the first form pre-filled. this second form is also a profile on the civicrm site.

the idea is that a civicrm ID is connected to this user by the time they get to the second form. the contact record either already exists or gets created by the time the user gets to the second form. the second form then gets generated in the same way that happens when you send a personalized email with a token that allows the receiver to edit their own record in civicrm.

i think that a hook needs to be written that happens when the form gets submitted the first time. that hook will grab or create the civicrm ID, generate the proper url that incorporates the token and profile we are using for the second form.

then, when the second form is submitted the record is updated. if the second form does not get submitted you have still already captured that email.

this is not done yet. has anyone done something like this? are there other ways to do this?

--josue

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: from a short form to a longer form that's partially pre-filled
October 21, 2011, 11:50:44 am
Other thoughts are about opening a session for the person when they fill in the first form so that the forms will be prefilled when they get redirected to the second one - there are downsides to opening sessions to non-logged in people though

Other option might be a variation on the module we have (not sure where it came from - think it might be one of ours) that allows a person to enter their email address and hit submit - this then fires off an email with checksum to that email address, so when they click on email link they get back to a prefilled profile.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

julianjohannesen

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
Re: from a short form to a longer form that's partially pre-filled
October 22, 2011, 11:13:40 am
thanks guys.  those both sound like promising ideas.  i'll investigate further.  i do like the idea that just entering your email address and hitting "go" or whatever creates a civicrm profile and that on submission you then go to your user profile, which you can further fill out.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • General Discussion (please no support requests here!) (Moderator: Michał Mach) »
  • from a short form to a longer form that's partially pre-filled

This forum was archived on 2017-11-26.