1

I'm doing a Zoo Visitor registration. If there's a problem with the user inputs, the errors show up fine but it blanks the form. I added code that I thought would fill the values in again but nothing gets filled in.

<div class="line">
    <label for="email">First Name:*</label>
    <div class="input_wrap">
        <input id="member_firstname" name="member_firstname" type="text" value="{member_firstname}" />
        {if error:member_firstname}<span class="error">{error:member_firstname}</span>{/if}
    </div>
</div>

<div class="line">
    <label for="email">Last Name:*</label>
    <div class="input_wrap">
        <input id="member_lastname" name="member_lastname" type="text" value="{member_lastname}" />
        {if error:member_lastname}<span class="error">{error:member_lastname}</span>{/if}
    </div>
</div>

<div class="line">
    <label for="email">Email:*</label>
    <div class="input_wrap">
        <input id="email" name="email" type="text" value="{email}" />
        {if error:email}<span class="error">{error:email}</span>{/if}
    </div>
</div>

And as I'm writing this I'm wondering has it something to do with parse order? We're using stash and maybe it's causing it not to load or is being overwritten during parsing. For the email field, having {email} as the value, always returns the email address of the super admin account. I've tried this in different browsers, logged out, incognito windows, etc. Always the same.

From looking at code examples and safecracker, zoo visitor stuff, I was under the impression that I use the form element name/id as the EE tag to fill it with data. Maybe I need a prefix or I've got something else running that's causing this.

Any help or suggestions would be greatly appreciated.

Thanks,

Dave

2

I found the answer to my own question...

Inside the stash tag, the form was wrapped in a {exp:channel:entries} tag. I realised I didn't need it, removed it and it worked then. Parse order must have changed things. It's working now though.

Ok, finished talking to myself now.

  • Please make sure to select your answer as "correct" by clicking on the checkmark to the left of the answer. – Anna_MediaGirl Jan 13 '13 at 1:16

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.