After more meanderings around the Universe of Webform_civicrm (Creator: Coleman) I started thinking that I should find a way to use it to collect more complex information about Organisations and Relationships which might be required as part of an event or membership registration.
The prompt for this particular meandering was that currently Event Registration does not provide any in-built options to collect information about an Organisation that the registrant might represent, beyond the Organisation Name (currently employer) and Job Title.
I was expecting to need to code this in to civi for an event that allowed for a multiple person registration and therefore anything we did to collect Organisation info for Person 1 would not be required for subsequent persons.
However, having seen Coleman referring to a 'hashed link', it finally dawned on me (oh alright with just a bit of help by big C) that since webform_civicrm could provide both a hidden Contact ID field and a hidden checksum, that we might be able to attach these in the weform redirect field and have an Anonymous user shifted to a pre-filled Event form where they would do the rest of the registration.
Well it all works superbly.
One CiviEvent or Contribution Page (that you put in the oven earlier)
One webform_civicrm form with at least Contact 1 (individual) and Contact 2 (organisation)
Go to the Webform Component for Contact 1 called Generate Checksum
Grab the snippet of code from there, which for above scenario would be cid1=%value[civicrm_1_contact_1_fieldset_fieldset][civicrm_1_contact_1_contact_contact_id]&cs=%value[civicrm_1_contact_1_fieldset_fieldset][civicrm_1_contact_1_contact_cs]
Grab the path for the Event/Contribution form
Go to the Webform "Form Settings'" tab and find the Redirection Location field
Paste in the path for the Event/Contribution then add on with a '&' the snippet from the checksum making sure you replace the cid1 with just cid
Run a few tests incognito.
Enjoy the pleasure of seeing the Webform create the contact person and the organisation with all the fields you can think of, and then smile as you get passed over to the civiform where you will see your anonymous users details prefilled and the 'Current Employer' field, if you chose to have it showing here, filled with the Organisation created via the above.
Dim the lights, light the candles, bring in the cake, celebrate.
(Note to self ... well, and coleman, lobo and others)
What would be awesome would be to be able to use the 'register for event' options in the Webform-Civicrm and then just pass the user over to CiviEvent to make the payment. The barrier to this is of course civi doesn't allow a contact to update their Participant data - ie if we use Event registration option in Webform then when we get to civi we get the "oops you appear to have already registered for the event"
Any thoughts on how to either sidestep this when coming from webform - or even to sidestep whenever a contact uses a checksum to get to the Event form. The latter would mean emails could be sent out to contacts so that they can then update their details - not sure if that option via checksum has been discussed and put in the 'kind-of-hard' basket.