Page 1 of 1

Copying forms in Admin Order Entry

Posted: Sun Sep 29, 2019 10:44 pm
by gerstavros
Hello. I am trying to edit the admin create order page (sale/order/add) so that input-firstname gets copied in input-payment-firstname, input-payment-firstname to input-shipping-firstname, etc by just pressing the next button.
I put in tpl
<script>
function copy()
{ var input-firstname = document.getElementById(input-firstname);
var input-payment-firstname =document.getElementById(input-payment-firstname);
input-firstname.value = input-payment-firstname.value; return false; }
</script>
and call the function on the button with onclick.
Nothing happens however. Any help?

Re: Copying forms in Admin Order Entry

Posted: Sun Sep 29, 2019 11:58 pm
by opencartmart
gerstavros wrote:
Sun Sep 29, 2019 10:44 pm
<script>
function copy()
{ var input-firstname = document.getElementById(input-firstname);
var input-payment-firstname =document.getElementById(input-payment-firstname);
input-firstname.value = input-payment-firstname.value; return false; }
</script>
Is this your pseudo code or real code? If this is pseudo code, please share real code. If it is real code, it does not make any sense.

Re: Copying forms in Admin Order Entry

Posted: Mon Sep 30, 2019 12:05 am
by gerstavros
opencartmart wrote:
Sun Sep 29, 2019 11:58 pm
Is this your pseudo code or real code? If this is pseudo code, please share real code. If it is real code, it does not make any sense.
this is the "real" code i tried to copy the input-firstname to input-payment-firstname when clicking the next button. sure i m not good in javascript

Re: Copying forms in Admin Order Entry

Posted: Thu Nov 21, 2019 6:02 am
by gerstavros
. .