Page 1 of 1

Self Registration registration form not showing new fields

Posted: Wed Jun 17, 2015 10:40 am
by paulbaker
I have Self Registration working with FEU. The registration form includes the usual fields:
Email address
Password
Password (again)
And the client requested 2 other fields:
Your name
Company name

These fields were set up in FEU before I hooked up Self Registration (I think) and so the Self Reg registration form shows the fields and it all works fine.

Later, client asked for a new field to be added: reason_for_request. So I added this new field in the FEU User Properties section under Your name and Company name. The new reason_for_request field is an 80 character text field.

However, this field is not showing in the Self Reg registration form. I have cleared cache.

My registration template is shown below.

Code: Select all

{* registration 1 template *}
<h3>{$title}</h3>
{if isset($message) && $message != ''}
  {if isset($error) && $error != ''}
    <div class="alert alert-danger">{$message}</div>
  {else}
    <div class="alert alert-info">{$message}</div>
  {/if}
{/if}

{$startform}{$hidden|default:''}
{if $controlcount > 0}
  {foreach from=$controls item=control}
    <div class="row">
      {if isset($control->hidden)}{$control->hidden}{/if}
      <p class="col-sm-3 text-right">{$control->marker}{$control->prompt}</p>
      <p class="col-sm-9">{$control->control}</p>
    </div>
  {/foreach}
{/if}

{if isset($captcha)}
  <div class="row">
    <p class="col-sm-3 text-right">{$captcha_title}</p>
    <p class="col-sm-9">{$captcha}</p>
  </div>
{/if}

<div class="row">
  <p class="col-sm-3 text-right">&nbsp;</p>
  <p class="col-sm-9">
    <input type="submit" name="{$actionid}sr_submit" value="{$mod->Lang('submit')}"/>
  </p>
</div>

{$endform}
The {foreach from=$controls item=control} loop runs but only shows the original 2 fields (Your name and Company name) - it does not show the new field reason_for_request.

How can I get the new field displayed on the registration form?

Thanks ;D

----------------------------------------------
Cms Version: 1.11.13
Installed Modules:
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.9
ModuleManager: 1.5.8
News: 2.15
Search: 1.7.12
ThemeManager: 1.1.8
CGExtensions: 1.46.4
FrontEndUsers: 1.28
SelfRegistration: 1.9
SEOTools2: 1.2.1
Notifications: 1.1
CGSimpleSmarty: 1.8
Archiver: 0.2.6

Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 64000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.5.20
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 64M
upload_max_filesize: 64M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.35
Server Db Grants: Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages
Server Time Diff: No filesystem time difference found

----------------------------------------------

Re: Self Registration registration form not showing new fiel

Posted: Wed Jun 17, 2015 10:51 am
by velden
Not sure but I recently searched a while for a similar case (though without selfreg) and noted that some fielddefs where not connected to a specific feu group, hence not included in the $controls variable etc.

You might give that a try; check feu groups and included fielddefs.

Re: Self Registration registration form not showing new fiel

Posted: Wed Jun 17, 2015 10:08 pm
by paulbaker
Perfect!

Under Users & Groups > Frontend User Management > Groups tab > click group > Each field has a Field Status dropdown - this was "Required" for the 2 fields showing correctly and "Off" for my new field.

Changed to Required and it shows in the registration form. 8)

Thanks [again] velden :D