Copy link to clipboard
Copied
Hello,
In a multipage form that on all the pages have the First Name, Last Name, first FName, and LName on the First page is unprotected and open for entry but following FName, LName on the other pages are protected ReadOnly with small twist on the filed names like HFName, HLName , AFName, ALName.....
What I want to do is that entry on the first page for FName, LName to be propagated on the other pages, so I run the following codes on the Validate tab or FName... LName is entered first then next field to be entered is FName.
=======================================
var aInput = event.value.split(" "); // make an array split at space
var sCharacter = '';
var sWord='';
// for each element of word array, capitalize the first letter
for(i = 0; i <aInput.length; i++)
{
aInput = aInput.substr(0, 1).toUpperCase() + aInput.substr(1).toLowerCase();
} // end loop for input string
// rebuild input string with modified words with spaces
event.value = aInput.join(' ');
getField("HLName").value = getField("LName").value;
getField("HFName").value = getField("FName").value;
getField("LFName").value = getField("LName").value + ", " + getField("FName").value;
======================================
HLName is get populated but HFName is left empty on the 2nd page and LFName on the third page which was supposed to come out like "Llllllll, Ffffffff" comes out as "Llllllllll," no FName at the end...
I can't understand why the full code does not get executed... It is interesting that LName only runs the Validation part of the code not the copying to the other fields.
LName field
FName field
Let me know if you need more info.
Regards,
Jeff P...
1 Correct answer
If I understand things correctly, you should replace these two lines:
getField("HFName").value = getField("FName").value;
getField("LFName").value = getField("LName").value + ", " + getField("FName").value;
With the following:
getField("HFName").value = event.value;
getField("LFName").value = getField("LName").value + ", " + event.value;
Copy link to clipboard
Copied
If I understand things correctly, you should replace these two lines:
getField("HFName").value = getField("FName").value;
getField("LFName").value = getField("LName").value + ", " + getField("FName").value;
With the following:
getField("HFName").value = event.value;
getField("LFName").value = getField("LName").value + ", " + event.value;
Copy link to clipboard
Copied
Thanks a lot it worked... I spend hours on this to figure out why it does not work...