Answer the question
In order to leave comments, you need to log in
How to duplicate the value of an input into another hidden input?
And so, I have a Joomla registration form.
The goal is to simplify the form. Enter e-mail and password + password confirmation.
Therefore, you need to use e-mail as a login, and this is the problem, because the form does not work without a field with the username parameter.
It would seem that the code below will solve everything.
<input type="email" id="email" value="" onkeyup="$('#username').val(this.value);"/>
Эти скрытое поле, куда нужно дублировать введенные данные из верхних инпутов.
<input type="hidden" id="username" name="username" value="" />
<?php echo $this->form->getField('email')->input; ?>
Answer the question
In order to leave comments, you need to log in
Then you need to change the selection in the database in the authorization module. You can't decide otherwise. No need to climb through the window, tell the script what you want to find under the field.
Or Jquery as a function..
function keyword() {
$("id").val() ....
}
If you cannot add an attribute to the input, but really want to, then put it in a separate script tag.
<script>
$('#email').on('keyup', function() {
$('#username').val(this.value);
});
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question