$title = trim($_REQUEST['title']);
$firstname = trim($_REQUEST['firstname']);
$lastname = trim($_REQUEST['lastname']);
if (!strlen($title))
{
notification::setError(t("please_enter_your_title", "Please enter your title"));
}
elseif (!strlen($firstname))
{
notification::setError(t("please_enter_your_firstname", "Please enter your firstname"));
}
elseif (!strlen($lastname))
{
notification::setError(t("please_enter_your_lastname", "Please enter your lastname"));
}
UserPeer::create($username, $newPassword, $emailAddress, $title, $firstname, $lastname);
UserPeer::create($username, $newPassword, $emailAddress, 'Mr', '', '');
<div class="input-group"> <span class="input-group-addon"><i class="fa fa-chevron-right"></i></span>
<select class="form-control" autofocus="autofocus" tabindex="1" id="title" name="title">
<option disabled selected><?php echo t("title", "title"); ?></option>
<option value="Mr" <?php echo ($title == 'Mr') ? 'SELECTED' : ''; ?>><?php echo t('title_mr', 'Mr'); ?></option>
<option value="Ms" <?php echo ($title == 'Ms') ? 'SELECTED' : ''; ?>><?php echo t('title_ms', 'Ms'); ?></option>
<option value="Mrs" <?php echo ($title == 'Mrs') ? 'SELECTED' : ''; ?>><?php echo t('title_mrs', 'Mrs'); ?></option>
<option value="Miss" <?php echo ($title == 'Miss') ? 'SELECTED' : ''; ?>><?php echo t('title_miss', 'Miss'); ?></option>
<option value="Dr" <?php echo ($title == 'Dr') ? 'SELECTED' : ''; ?>><?php echo t('title_dr', 'Dr'); ?></option>
<option value="Pro" <?php echo ($title == 'Pro') ? 'SELECTED' : ''; ?>><?php echo t('title_pro', 'Pro'); ?></option>
</select>
</div>
<div class="input-group"><span class="input-group-addon"><i class="fa fa-chevron-right"></i></span>
<input type="text" class="form-control" placeholder="<?php echo t("firstname", "firstname"); ?>" tabindex="1" value="<?php echo isset($firstname) ? validation::safeOutputToScreen($firstname) : ''; ?>" id="firstname" name="firstname">
</div>
<div class="input-group"><span class="input-group-addon"><i class="fa fa-chevron-right"></i></span>
<input type="text" class="form-control" placeholder="<?php echo t("lastname", "lastname"); ?>" tabindex="1" value="<?php echo isset($lastname) ? validation::safeOutputToScreen($lastname) : ''; ?>" id="lastname" name="lastname">
</div>
What about V 5 ???Hi,
Yes you should be able to remove it. Try the following:
In:
"\themes\flow\templates\register.html"
Find and remove:
Also remove:Code:$title = trim($_REQUEST['title']); $firstname = trim($_REQUEST['firstname']); $lastname = trim($_REQUEST['lastname']);
Change:Code:if (!strlen($title)) { notification::setError(t("please_enter_your_title", "Please enter your title")); } elseif (!strlen($firstname)) { notification::setError(t("please_enter_your_firstname", "Please enter your firstname")); } elseif (!strlen($lastname)) { notification::setError(t("please_enter_your_lastname", "Please enter your lastname")); }
to:Code:UserPeer::create($username, $newPassword, $emailAddress, $title, $firstname, $lastname);
You'll need to edit the content for the register email as it uses the firstnae. In the script admin, languages section, search for and edit the content for 'register_user_email_content'.Code:UserPeer::create($username, $newPassword, $emailAddress, 'Mr', '', '');
Remove:
That *should* do it. I've not tested it locally, but it should point you in the right direction.Code:<div class="input-group"> <span class="input-group-addon"><i class="fa fa-chevron-right"></i></span> <select class="form-control" autofocus="autofocus" tabindex="1" id="title" name="title"> <option disabled selected><?php echo t("title", "title"); ?></option> <option value="Mr" <?php echo ($title == 'Mr') ? 'SELECTED' : ''; ?>><?php echo t('title_mr', 'Mr'); ?></option> <option value="Ms" <?php echo ($title == 'Ms') ? 'SELECTED' : ''; ?>><?php echo t('title_ms', 'Ms'); ?></option> <option value="Mrs" <?php echo ($title == 'Mrs') ? 'SELECTED' : ''; ?>><?php echo t('title_mrs', 'Mrs'); ?></option> <option value="Miss" <?php echo ($title == 'Miss') ? 'SELECTED' : ''; ?>><?php echo t('title_miss', 'Miss'); ?></option> <option value="Dr" <?php echo ($title == 'Dr') ? 'SELECTED' : ''; ?>><?php echo t('title_dr', 'Dr'); ?></option> <option value="Pro" <?php echo ($title == 'Pro') ? 'SELECTED' : ''; ?>><?php echo t('title_pro', 'Pro'); ?></option> </select> </div> <div class="input-group"><span class="input-group-addon"><i class="fa fa-chevron-right"></i></span> <input type="text" class="form-control" placeholder="<?php echo t("firstname", "firstname"); ?>" tabindex="1" value="<?php echo isset($firstname) ? validation::safeOutputToScreen($firstname) : ''; ?>" id="firstname" name="firstname"> </div> <div class="input-group"><span class="input-group-addon"><i class="fa fa-chevron-right"></i></span> <input type="text" class="form-control" placeholder="<?php echo t("lastname", "lastname"); ?>" tabindex="1" value="<?php echo isset($lastname) ? validation::safeOutputToScreen($lastname) : ''; ?>" id="lastname" name="lastname"> </div>
Thanks,
Adam.
<div class="col-md-4" style="display: none;">
<select autofocus="autofocus" tabindex="1" id="title" name="title">
<option value="" selected>{{ t("title", "title") }}</option>
{% for value in titleOptions %}
<option value="Mr" {{ (title == value) ? 'SELECTED' : '' }}>{{ t('title_'~value, value) }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6">
<input name="firstname" id="firstname" type="text" placeholder="{{ t("firstname", "firstname")|title }}" autocomplete="off" value="{{ firstname }}"/>
</div>
<div class="col-md-6">
<input name="lastname" id="lastname" type="text" placeholder="{{ t("lastname", "lastname")|title }}" autocomplete="off" value="{{ lastname }}"/>
</div>
$title = trim($request->request->get('title'));
$firstname = trim($request->request->get('firstname'));
$lastname = trim($request->request->get('lastname'));
if (!strlen($firstname)) {
NotificationHelper::setError(TranslateHelper::t("please_enter_your_firstname", "Please enter your firstname"));
}
elseif (!strlen($lastname)) {
NotificationHelper::setError(TranslateHelper::t("please_enter_your_lastname", "Please enter your lastname"));
}
else