Page 1 of 1

Front End User properties - re order list [solved]

Posted: Wed Nov 24, 2010 10:00 am
by howey
Hi

I am just starting to use the FEU module. I thought I had planned out all the properties but now find I need to add another property against the user. I can add the property no problem, but it appears at the bottom of the list - hence when I user the self registration module the property appears at the bottom of the form. Ideally I would like this property to appear near the top of the form. Is there a way of re ordering the properties in FEU or is it a case of re entering all the properties again.

I'm sorry if this has been discussed before - I have searched the forum but haven't found any threads relating to this.

Thanks

PS I did find a thread that would write the self reg form in the right order - I just wondered if the information in FEU can be re ordered?

Re: Front End User properties - re order list

Posted: Wed Nov 24, 2010 5:14 pm
by Ricko97
You don't actually need to re-order the properties in FEU, because you can customize the SelfRegistration template to include whatever properties you like in whatever order you like.

There is a thread about that floating around somewhere, but I can't find it myself. I will just recap here instead.

So, in SelfRegistration, in Registration Template 1, you can do this:

Code: Select all

{foreach from=$controls item=control}
    {assign var=$control->name value=$control}
{/foreach}
Then all you need to do for the form itself is something like this:

Code: Select all

{$startform}
<fieldset>
	<strong>{$username->prompt}</strong>{$username->marker}<br />
	{$username->hidden}
	{$username->control}
	<br /><br />
	<strong>{$password->prompt}</strong>{$password->marker}<br />
	{$password->hidden}
	{$password->control}
	<br /><br />
	<strong>{$repeatpassword->prompt}</strong>{$repeatpassword->marker}<br />
	{$repeatpassword->hidden}
	{$repeatpassword->control}
	<br /><br />
	<strong>{$email->prompt}</strong>{$email->marker}<br />
	{$email->hidden}
	{$email->control}
	<br /><br />
	<strong>{$email_again->prompt}</strong>{$email_again->marker}<br />
	{$email_again->hidden}
	{$email_again->control}
	<br /><br />
	<strong>{$real_name->prompt}</strong>{$real_name->marker}<br />
	{$real_name->hidden}
	{$real_name->control}
	<br /><br />
	{$hidden}{if isset($hidden2)}{$hidden2}{/if}
	<input name="{$feuactionid}submit" id="{$feuactionid}submit" value="Submit" type="submit" />
</fieldset>
{$endform}
...and SelfRegistration will handle the rest :) also, you can use {get_template_vars} to see the variables available in the registration template, OR you can use something like {$controls|print_r} to see a recursive list of the control array (the properties available to SelfRegistration).

You should be able to use those to determine what variables to use - but for example, an FEU property with the alias "about_me" would be {$about_me->prompt} (the label), {$about_me->marker} ("required" marker if it's a required field), {$about_me->hidden} (hidden inputs for the property, if any) and {$about_me->control} (the input itself).

Hope that helps.

Re: Front End User properties - re order list

Posted: Wed Nov 24, 2010 5:53 pm
by calguy1000
You can also re-order them by editing a group definition.

Re: Front End User properties - re order list

Posted: Fri Nov 26, 2010 1:58 pm
by howey
Hi

Thanks, I new there would be a couple of ways around it, I just couldn't find the right thread.

The group control option will be the best bet in the first instance, while I play around. Modifying the template is going to be a great help when I come to make the database live.

Again many thanks - everyday I learn something new. I hope one day that I can be as helpful to someone else. A big thumbs up to CMSMS and the community.

Re: Front End User properties - re order list [solved]

Posted: Mon Jun 13, 2011 12:31 am
by pixelita
I know this is an old thread, but I think it touches on my issue. The output for the Registration Form (which in this case is being used in conjunction with the Products module and is registration for the site prior to purchasing items), has inline styles which I want to get rid of and use semantical markup. Here's a taste of the code that the Registration template currently spits out:

Code: Select all

<!-- Self-Reg Registration 1 template -->

Register
<form id="mc4fc0moduleform_1" method="post" action="http://honfish.pixelita.net/store/register" class="cms_form">
<div class="hidden">
<input type="hidden" name="mact" value="SelfRegistration,mc4fc0,reguser,1" />
<input type="hidden" name="mc4fc0returnid" value="113" />
<input type="hidden" name="page" value="113" />
</div>


<font color="gray">Email*</font>
<input type="text" class="cms_textfield" name="mc4fc0input_username" id="mc4fc0input_username" value="" size="40" maxlength="40" />


<font color="gray">Password*</font>
<input type="password" class="cms_password" id="mc4fc0input_password" name="mc4fc0input_password" value="" size="20" maxlength="20" />


<font color="gray">Password (again)*</font>
<input type="password" class="cms_password" id="mc4fc0input_repeatpassword" name="mc4fc0input_repeatpassword" value="" size="20" maxlength="20" />


<font color="gray">First Name*</font>
<input type="text" class="cms_textfield" name="mc4fc0input_firstname" id="mc4fc0input_firstname" value="" size="20" maxlength="20" />
And so on and so forth. My form is onerous with 17 fields because it will have a Ship to and a Bill to set of contact information. I think the way that was proposed above would be tedious in this instance for every single field.

Is there a way to hack into the code that the template spits out to get rid of all that inline style markup? I cannot find that template anywhere.

The OTHER thing I want to do is insert divide the Bill to and Ship to fields into two fieldsets and I cannot see where I can make this happen either.

Thanks.

Page is here, and again, credentials are: Client/letmein:
http://honfish.pixelita.net/store/register/

Re: Front End User properties - re order list [solved]

Posted: Mon Jun 13, 2011 11:28 pm
by beherenow_uk
howey wrote:PS I did find a thread that would write the self reg form in the right order
Hi there - where is this thread that you mentioned?

I'm trying to get a couple of custom fields to display above the mandatory email and password that are built into the default self-reg form.

At the moment i have: http://bookbark.kargo2.com/
Whereby 'Name' and 'Bookshop name' come last, but i actually want them to come first.

Any help would be fantastic - thanks!

Karl

Re: Front End User properties - re order list [solved]

Posted: Mon Sep 03, 2012 3:53 pm
by leximus
Hi,

Thanks to this topic I managed to customize my user properties template. With one exception: I don't get the image upload field working. I'm surely missing something.

That's how I tried to make it show up, but nothing appears:
I used this code to start
So, in SelfRegistration, in Registration Template 1, you can do this:
Code:
{foreach from=$controls item=control}
{assign var=$control->name value=$control}
{/foreach}
And then in the form:
{$foto->prompt} {$foto->marker}{$foto->hidden} {$foto->control}
With get_template_vars I can see all variables, except the foto variable for the image. All other fields are working correctly and the variable is also correctly attached to the user group.

Thank you for any help and best regards,

Lex

Re: Front End User properties - re order list [solved]

Posted: Mon Oct 22, 2012 7:26 pm
by leximus
Hi,

Does anybody know how I can display an upload image field when customizing the template (as I asked in my last post here) ?
Thank you very much!

Lex