Home › Forums › Quform WordPress › Copying data from a field to another (same form)
- This topic has 2 replies, 2 voices, and was last updated 5 years ago by Ally.
- AuthorPosts
- November 20, 2019 at 4:03 pm #30261carlichyParticipant
I´m trying to copy data from these test boxes –> email=7_8, web=7_52 and phone=7_11) to these other boxes of the next page with the IDs: email=7_65, web=7_67, and phone=7_58.
I have read this topic using a check-box,
but I want to activate the copy clicking the next button of my first page not with a check box.The code I have tried is this but <b>it doesn´t work</b>. ¿Can you help me?
jQuery(function ($) {
$(‘.quform-field-7_2’).click(function () {
var copy = $(this).is(‘clicked == true’);$(‘.quform-field-7_8’).val(copy ? $(‘.quform-field-7_65’).val() : ”);
$(‘.quform-field-7_52’).val(copy ? $(‘.quform-field-7_67’).val() : ”);
$(‘.quform-field-7_11’).val(copy ? $(‘.quform-field-7_58’).val() : ”);
});
});November 20, 2019 at 7:31 pm #30262carlichyParticipantIssue solved!
The solution in this topic
I write my code for someone need it as an example (you have to use in the Custom JavaScript plugin option):
jQuery(function ($) {
$(‘.quform-field-7_8’).blur(function () {
$(‘.quform-field-7_65’).val($(this).val());
});
$(‘.quform-field-7_52’).blur(function () {
$(‘.quform-field-7_67’).val($(this).val());
});
$(‘.quform-field-7_11’).blur(function () {
$(‘.quform-field-7_58’).val($(this).val());
});
});November 21, 2019 at 11:09 am #30269AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.