1

I have a webform with an existing contact, which is normally prefilled but can be changed with autoselect, then up to 5 new contacts. The existing contact can then enter up to 5 new contacts. By the way, the existing contact is a person who is nominating children for Christmas presents! It all works well, however I'd like the existing contact name that's selected to be stored in the new contact records, in a custom field (so we can quickly see who added the record). I've not found a way to do this, so have tried to default it from the token [current-user:civicrm-contact]. This doesn't work, and also saw this from 2016 but that didn't work. Any ideas on how to fix this, or any alternative methods? Civi is at 5.28.3 and of course it's Drupal 7.

1 Answer 1

1

"I'd like the existing contact name that's selected to be stored in the new contact records, in a custom field" ->

Quick solution and better from a data point of view -> use Relationships.

That way you can not only see who has nominated a child for a present but also get a list of all kids nominated by a certain contact.

Cool project!

2
  • We do use relationships & we can see who has nominated the child using the UI. The difficulty is putting this info in the contact record of the child for when we download them to make labels. However I just realised that when we export the records we can export the other side of the relationship so we can get the info needed. So thanks for jogging my little grey cells on this!
    – Andy Clark
    Commented Oct 19, 2020 at 16:15
  • Great- glad that helped you out! Commented Oct 19, 2020 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.