how are you?
I need your valuable help, I want to copy and paste the value of a textbox to a dropdown when loading the form.
Thank you
I need your valuable help, I want to copy and paste the value of a textbox to a dropdown when loading the form.
Thank you
HI afgaleano1212,
I'm sorry but I don't understand - what exactly do you need to do?
Bob
I'm sorry but I don't understand - what exactly do you need to do?
Bob
In a field I have the name of the user who logged in to see the form with the following code:
[strong]<?php
if ( isset($form->data['name']) && $form->data['name'] ) {
$name = $form->data['name'];[br]} else {[br] $user =& JFactory::getUser();[br] $name = $user->name;[br]}[br]?>[br]<input type='text' readonly='readonly 'name='name' id='name' value='<?php echo $name; ?>' /> [/strong]
[strong]<?php
if ( isset($form->data['name']) && $form->data['name'] ) {
$name = $form->data['name'];[br]} else {[br] $user =& JFactory::getUser();[br] $name = $user->name;[br]}[br]?>[br]<input type='text' readonly='readonly 'name='name' id='name' value='<?php echo $name; ?>' /> [/strong]
So..... put it in there then?
<select name=''>
<option selected value='<?=$name; ?>'><?=$name;?></option>
</select>
<select name=''>
<option selected value='<?=$name; ?>'><?=$name;?></option>
</select>
Hi healyhatman
It did not work, enter the code and do not load the form, enter as follows:
<?php
if ( isset($form->data['name']) && $form->data['name'] ) {
$name = $form->data['name'];
} else {
$user =& JFactory::getUser();
$name = $user->name;
}
?>
<input type='text' readonly='readonly 'name='name' id='name' value='<?php echo $name; ?>' />
<select name="">
<option selected value='<?=$names;?>'><?=$name;?</option>
</select>
It did not work, enter the code and do not load the form, enter as follows:
<?php
if ( isset($form->data['name']) && $form->data['name'] ) {
$name = $form->data['name'];
} else {
$user =& JFactory::getUser();
$name = $user->name;
}
?>
<input type='text' readonly='readonly 'name='name' id='name' value='<?php echo $name; ?>' />
<select name="">
<option selected value='<?=$names;?>'><?=$name;?</option>
</select>
You put $names in there did you realise
This topic is locked and no more replies can be posted.