Post by gerstavros » Sun Sep 29, 2019 10:44 pm

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?

New member

Posts

Joined
Mon Apr 04, 2016 12:44 am

Post by opencartmart » Sun Sep 29, 2019 11:58 pm

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.

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by gerstavros » Mon Sep 30, 2019 12:05 am

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

New member

Posts

Joined
Mon Apr 04, 2016 12:44 am

Post by gerstavros » Thu Nov 21, 2019 6:02 am

. .


Last bumped by gerstavros on Thu Nov 21, 2019 6:02 am.

New member

Posts

Joined
Mon Apr 04, 2016 12:44 am
Who is online

Users browsing this forum: Bing [Bot] and 363 guests