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
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25903
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. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.