I want to check to see if what I want to do is feasible.

We already have a webform set up to register users for events; I would like to enable users to update their participant record with additional information that is in custom data fields within a custom data set (Participant);

I created a webform and added a "Register Contacts for Event" section, and included the fields I wanted users to add. But it creates an entirely new event registration for the user.

I included contact_id as a hidden field- would it work to include participant_id? Or am I barking up the wrong tree altogether.

My other option- also pretty easy- is to move the custom data set so that it is attached to Contacts, rather than Participants. But it would make more sense to be attached to the Participant record.

Comments

colemanw’s picture

No, I think you're barking up the right tree.

Currently, this module will always update rather than create a participant record if one already exists for a given event/contact pair. If this is not happening and you are using the latest version, it is a bug.

However, this module does not autofill participant fields from existing participant records the way it does for contacts, etc. Probably it ought to, and I can add that soon. But in order to work, the event would need to be set by the admin rather than exposed to the form.

BTW, hidden fields are not used to set ids, only to retrieve them. In other words, if you add a hidden CID field, the webform_civicrm module will populate it and you can use it in a webform token, etc. But you can't use it to pass data to webform_civicrm. Use URL args instead (contact and activity ids are accepted in the url eg. cid1=123&cid2=456&aid=789) - sorry, participant ID isn't implemented yet (and would need to be in a different format since you can have more than one of them per contact).

colemanw’s picture

I misspoke... it does autofill custom and core fields from existing participant records. So webform should be a good solution for you to allow people to both register, and update their existing registration.

colemanw’s picture

Also, version 2.4 contains a new feature that allows you to send hashed links from the webform submission, which means you could email anon users a link to the form, giving the option to update their reg.

colemanw’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.