1

I'm using Freeform on my website for new requests from members only. I want to create a custom notification of these requests and show member-data (custom fields they provide during registration) in these notifications. Therefore I've created a new custom notification as followed:

Someone has filled out form: Request
{all_form_fields}
  {field_label}: {field_data}
{/all_form_fields}

{exp:member:custom_profile_data member_id="{user_entry_id}"}
  Company: {company_name}
  Address: {address}
{/exp:member:custom_profile_data}

The {user_entry_id} variable is a hidden field in my form which is populated by the member_id. This value gets passed on correctly.

My problem is that {user_entry_id} isn't parsed and the company & address data fields are empty. When I insert a member_id manually it does work:

{exp:member:custom_profile_data member_id="1"}

However, that part should be dynamic.

Any thoughts?

1

If you use the {exp:member:custom_profile_data} tag without any paramter it will automatically use the currently logged in member.

This also works in the email notification.

1

Is the field you are storing {user_entry_id} in a field you've actually added to Freeform itself? If not, its not going to carry over into notifications.

If you are using Freeform Pro, there is a hidden field type that you can use, which even has CURRENT_USER (logged in member_id) as a possible default value (at creation time).

If you are using the free version of Freeform, you can just add a text field named 'user_entry_id' without any other modification to your form and keep using the hidden field you are using now, and it will save the data and should carry over to notifications then as it will be a field registered with that form.

  • This is not really the problem; I am receiving the user_entry_id correctly. However, I need to retrieve this user's data for the person processing the data. The member-lookup isn't working, because the tag-in-a-tag isn't parsed. – raps Oct 17 '13 at 15:26
  • So its being parsed if you just have it setting alone in the template? Because all Freeform field variables are parsed before the template engine is run on the notification template, so it shouldn't be a race condition. – Solspace Oct 17 '13 at 15:35
  • It's being parsed if {user_entry_id} is just in the template. But it's not working as an argument for exp:member:custom_profile_data. So your claim for parsing sequence seems invalid? Of is there something I'm missing? – raps Oct 18 '13 at 7:04
  • Seems to be working for me in my tests. So you have a Freeform custom field set up called "user_entry_id" and used in your Freeform form. What version of Freeform and EE are you using? (Maybe add that in the OP) Can you post your template code for the form, or a simplified version of it? Alternative workaround: use {embed} in the notification and pass the value for {user_entry_id}, eg: {embed="template_group/template" user_entry_id="{user_entry_id}"} – Solspace Oct 18 '13 at 17:16
  • I was unable to get it working this way (Freeform v4.0.12 & EE v2.6.1). – raps Oct 21 '13 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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