I changed the address using javascript, however it is not saving once sent to Laserfiche. I also used this example on how to change the description and it didn't work.
Question
Question
Answer
SELECTED ANSWER
replied on April 17, 2016
Hello Chynna,
Your script didn't work because there was no "input" element on submitted form.
Can you try this one?
$(document).ready(function () { addressChange(); $('.cf-collection-append').click(addressChange); function addressChange() { $("span[id*=_DSG0], input[id*=_DSG1], div[id*=_DSG1]").siblings().text('Address Line 2/Apt. #'); $("span[id*=_DSG3], input[id*=_DSG3], div[id*=_DSG3]").siblings().text('State'); $("span[id*=_DSG4], input[id*=_DSG4], div[id*=_DSG4]").siblings().text('Zip Code'); $("span[id*=_DSG5], input[id*=_DSG5], div[id*=_DSG5]").parent().children().css('display', 'none'); } })
1
0
Replies
replied on April 4, 2016
Chynna,
When you say that you "changed it using javascript", can you give us an example of the code you used?
Is your form showing any Javascript errors in the console after inserting the code from Alexander's answer?
0
0
replied on April 11, 2016
$(document).ready(function () { addressChange(); $('.cf-collection-append').click(addressChange); function addressChange() { $("span[id*=_DSG0], input[id*=_DSG1]").siblings().text('Address Line 2/Apt. #'); $("span[id*=_DSG3], input[id*=_DSG3]").siblings().text('State'); $("span[id*=_DSG4], input[id*=_DSG4]").siblings().text('Zip Code'); $("span[id*=_DSG5], input[id*=_DSG5]").parent().children().css('display', 'none'); } });
0
0
replied on April 15, 2016
Hello Chynna,
What is the outcome when you replaced your JS with what Alexander had posted?
$(document).ready (function () { $(".State").siblings().text('State'); })
0
0
replied on April 15, 2016
Hey Glen, because I was on version 9.2. I had to use this script.
$(document).ready (function () { $(".Country").parent().children().css('display', 'none'); $("#Field1_DSG5").siblings().css('display', 'none'); })
1
0
SELECTED ANSWER
replied on April 17, 2016
Hello Chynna,
Your script didn't work because there was no "input" element on submitted form.
Can you try this one?
$(document).ready(function () { addressChange(); $('.cf-collection-append').click(addressChange); function addressChange() { $("span[id*=_DSG0], input[id*=_DSG1], div[id*=_DSG1]").siblings().text('Address Line 2/Apt. #'); $("span[id*=_DSG3], input[id*=_DSG3], div[id*=_DSG3]").siblings().text('State'); $("span[id*=_DSG4], input[id*=_DSG4], div[id*=_DSG4]").siblings().text('Zip Code'); $("span[id*=_DSG5], input[id*=_DSG5], div[id*=_DSG5]").parent().children().css('display', 'none'); } })
1
0
replied on April 18, 2016
Thanks Rui!
0
0
You are not allowed to follow up in this post.