Hello,
I had previously been using this technique to copy data from one set of fields to another.
http://www.chronoengine.com/faqs/2690-how-can-i-automatically
It was working well until I had to convert the form from a tabbed form to a multipage form.
(I only changed the containers to *pages* rather than *tabs* - the code remained the same.)
So I'm not sure if there is something about the multi page setup that would interfere?
I have one column with an ID of billiing_data
I have one column with an ID of shipping_data
I have a 'copy' button with an ID of copy_address
In the billing_data column are fields with ID's like...
company_address
company_town
In the shipping_data column are fields with ID's like...
invoice_address
invoice_town
The on load LoadJavaScript is
So as I said, this worked perfectly until I changed to a Multipage form.
Any thoughts what I could be doing wrong?
Many thanks!
I had previously been using this technique to copy data from one set of fields to another.
http://www.chronoengine.com/faqs/2690-how-can-i-automatically
It was working well until I had to convert the form from a tabbed form to a multipage form.
(I only changed the containers to *pages* rather than *tabs* - the code remained the same.)
So I'm not sure if there is something about the multi page setup that would interfere?
I have one column with an ID of billiing_data
I have one column with an ID of shipping_data
I have a 'copy' button with an ID of copy_address
In the billing_data column are fields with ID's like...
company_address
company_town
In the shipping_data column are fields with ID's like...
invoice_address
invoice_town
The on load LoadJavaScript is
jQuery(document).ready(function (jQ) {
jQ('#copy_address').on('click', function() {
var inputs,source, source_id, target_id;
inputs = jQ('#billing_data :input');
jQ.each(inputs, function() {
source = jQ(this);
source_id = source.attr('id');
target_id = source_id.replace('company_', 'invoice_');
jQ('#'+target_id).val(source.val());
});
});
});
So as I said, this worked perfectly until I changed to a Multipage form.
Any thoughts what I could be doing wrong?
This is private content
Many thanks!
Ah ha! The penny has dropped!
Of course, the Load JavaScript should be on On page 2.
Ah well you live and learn.
I wonder if that's one for the FAQ, Bob?
(But then again maybe others aren't as thick as I am.😟 )
Of course, the Load JavaScript should be on On page 2.
Ah well you live and learn.
I wonder if that's one for the FAQ, Bob?
(But then again maybe others aren't as thick as I am.😟 )
This topic is locked and no more replies can be posted.