How can add a new selectable field in the edit account form

27.07.2015 17:37
#1
hossein309
Joomshopping forum user no avatar
Name: Hossein
19.05.2014
Posts: 1
Quote
How can add a new selectable field in the edit account form

dear joomshopping developers

How can add a new selectable field, just like as the title field, in the edit account form?
I added this pice of code to the "templates/default/user/editaccount.php" file

<?php if ($config_fields['new_option']['display']){?>
<tr>
<td class="name">
<?php print _JSHOP_REG_NEW_OPTION ?> <?php if ($config_fields['new_option']['require']){?><span>*</span><?php } ?>
</td>
<td>
<?php print $this->select_new_option ?>
</td>
</tr>
<?php } ?>

Now how and where can I define the new_option variable and how can I make new_option a required fields?

I greatly appreciate your help


Joomla: 3.2.3
JoomShopping: 4.4.3

Letzte Ă„nderung: 27.07.2015 18:08
 
28.07.2015 21:25
#2
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16475
Quote
Aw: How can add a new selectable field in the edit account form

use JHTML in template

<?php

$f_option = array();
$f_option[] = JHTML::_('select.option', 0, "---", 'id', 'name');
$f_option[] = JHTML::_('select.option', 1, 1, 'id', 'name');
$f_option[] = JHTML::_('select.option', 2, 2, 'id', 'name');
print JHTML::_('select.genericlist', $f_option, 'publish', '', 'id', 'name', $publish);

?>

 
Copyrights MAXXmarketing GmbH. All Rights Reserved