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.

Custom member fields in email module

August 17, 2011 7:27am

Subscribe [3]
  • #1 / Aug 17, 2011 7:27am

    robert_c

    1 posts

    Hi,

    I am trying to auto fill a form with custom member fields if the user is logged in. The custom fields do not complete and all I get is a the tag and not the data when the user is logged in. The regular member fields do auto complete.

    here is the form as coded.

    {exp:email:contact_form user_recipients="false" recipients="rob@•••.es" name="bookingForm" return="" charset="utf-8"}
            
                <h2>Please fill out the form to get in contact via email. We will replay asap.</h2>
    <p>        <br />
                <label for="from">Your Email:</label></p>
    
    <p>            <input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" /></p><br />
            <br />
                <label for="subject">Subject:</label></p>
    
    <p>            <input type="text" id="subject" name="subject" size="40" value="Contact Form" />Online Service or repair Booking<br />
                <label for="street">Your street</label> <input type="text" name="message[]" id="street" {if logged_in}value="{street}"{/if} name="required[]"  300px;" /></p><br />
                <label for="town">Town</label> <input type="text" name="message[]" id="town" {if logged_in}value="{town}"{/if} name="required[]"  300px;" /></p><br />
                <label for="postcode">Postcode</label> <input type="text" name="message[]" id="postcode" {if logged_in}value="{postcode}"{/if} name="required[]"  300px;" /></p><br />
                <label for="tel-mobile">Mobile Number</label> <input type="text" name="message[]" id="tel-mobile" {if logged_in}value="{tel-mobile}"{/if} name="required[]"  300px;" /></p><br />
                <label for="tel-land">Landline</label> <input type="text" name="message[]" id="tel-land" {if logged_in}value="{tel-land}"{/if} name="required[]"  300px;" /></p><br />
                <label for="car_reg">Car Registration</label> <input type="text" name="message[]" id="car_reg" {if logged_in}value="{car_reg}"{/if} name="required[]"  300px;" /></p><br />
                <label for="car_make">Car make & model</label> <input type="text" name="message[]" id="car_make" {if logged_in}value="{car_make}"{/if} name="required[]"  300px;" /></p><br />
                <label for="message">Message:</label></p>
    
    <p>            <textarea id="message" name="message[]" rows="18" cols="40">An Email from: {member_name}<br />
                    Sent at:  {current_time format="%Y %m %d"}</textarea></p><br />
                {if captcha}<br />
                <br />
                <br />
                <br />
                Please enter the word you see in the image below:<br />
                <br />
                <br />
                <br />
                {captcha}</p>
    
    <p>            <br />
                <input type="text" name="captcha" value="" maxlength="20" /></p><br />
                <br />
                <br />
                <br />
                {/if}<br />
                    <input name="submit" type='submit' value='Submit Form' /></p><br />
            <br />
            {/exp:email:contact_form}

    I am just wondering if it is possible with the email module or I would have to go with something like freefom. I hope I have explained it well enough too.

    Thanks
    Rob

  • #2 / Aug 17, 2011 9:41am

    Fusion Design

    128 posts

    Hi Rob,

    You should be able to wrap your data in the following tag:

    {exp:member:custom_profile_data}

    http://ellislab.com/expressionengine/user-guide/modules/member/custom_profile_data.html

  • #3 / Aug 17, 2011 11:38am

    robert_c

    1 posts

    Hi…

    Yep this solution works perfect, even though I lost patience this morning and ended up with a Freeform form.

    Thanks for the advice, least next time I won’t be tearing my hair out.

    Rob

  • #4 / Aug 17, 2011 7:19pm

    Dan Decker

    7338 posts

    Hello Rob,

    I’m sorry we weren’t able to respond in time to offer you a solution. I do apologize for that. I am glad to see that you were able to find a workable solution in our absence. We are constantly working to improve support response times, and your frustration compels us to work even harder towards that goal.

    Thank you Fusion Design for your assistance.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases