ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem with Custom Profile Tags

February 22, 2011 5:00pm

Subscribe [2]
  • #1 / Feb 22, 2011 5:00pm

    Roi Agneta

    352 posts

    I am building an event registration form and want to pre fill certain fields if the visitor is a member and logged in.  I used the Custom Profile Data tag, but it is only returning certain custom fields. I have all the usual contact info - name, address, city, phone, etc, but only a few fields are returned, like last name but not first, street address but not city, etc..  I checked and double checked that I am spelling the field names correctly - even did a cut and paste from the custom member fields, but no luck. 

    I know the data is good, because I can access it fine using custom sql, but it consistently does not work using the Custom Profile tag.

    I hope I am doing something really dumb, but it does not seem so.  Any ideas would be appreciated.

    V 2.1.3 build 20101220

  • #2 / Feb 23, 2011 7:01am

    John Henry Donovan

    12339 posts

    Roi,

    Can you show us what you have done so far?
    Make sure you are logged out as SuperAdmin when testing unless you have gone ahead and filled in those extra profile fields yourself

  • #3 / Feb 23, 2011 2:40pm

    Roi Agneta

    352 posts

    John - I have narrowed it down to the fact that I have three levels of {exp} tags, including Freeform.  Here is the idea:

    {exp:channel:entries….}
    <!---info from a channel entry | includes variables that show/hide fields in the embedded Freeform form ---->
      
       {exp:freeform:form….}
            {exp:member:custom_profile_data}
                <!---member contact info------->
             {/exp:member:custom_profile_data}
    
           <!----- freeform fields relating to an event registration | influenced by Channel Entry variables----->
       {/exp:freeform:form}
    
    {exp:channel:entries}

    Doing this results in only some of my custom member fields showing up - no rhyme or reason to it that I can determine (BTW, I created a dummy user, so no Super Admin issues).  If I get rid of the Channel Entry tags everything works fine, so it appears to be some kind of parsing issue.

    Any thoughts?

    Thanks!

    Roi

  • #4 / Feb 24, 2011 4:15am

    John Henry Donovan

    12339 posts

    Roi,

    Yes parsing issue. Some of your member profile variables belong to the channel:entries tag so things are getting confused.

    I would try embedding the member profile tags from another new template and see if that works for you

    {exp:channel:entries….}
    <!---info from a channel entry | includes variables that show/hide fields in the embedded Freeform form ---->
      
       {exp:freeform:form….}
            
    {embed="includes/profiletempalte"}
    
           <!----- freeform fields relating to an event registration | influenced by Channel Entry variables----->
       {/exp:freeform:form}
    
    {/exp:channel:entries}
  • #5 / Feb 24, 2011 11:03am

    Roi Agneta

    352 posts

    John - I decided to use JavaScript instead of EE conditionals, which means I do not have to wrap the Channel Entry tags around everything.  Works just fine and avoids the problem.

    Thanks for the follow up!

    Roi

  • #6 / Feb 24, 2011 5:33pm

    Ingmar

    29245 posts

    Glad to see you found a solution. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases