Not sure what could be wrong with my script...
hello,
in multipage form on pages have first name, last name, first fname, , lname on first page unprotected , open entry following fname, lname on other pages protected readonly small twist on filed names hfname, hlname , afname, alname.....
what want entry on first page fname, lname propagated on other pages, run following codes on validate tab or fname... lname entered first next field entered fname.
=======================================
var ainput = event.value.split(" "); // make array split @ space
var scharacter = '';
var sword='';
// each element of word array, capitalize first letter
for(i = 0; <ainput.length; i++)
{
ainput[i] = ainput[i].substr(0, 1).touppercase() + ainput[i].substr(1).tolowercase();
} // end loop input string
// rebuild input string modified words 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 populated hfname left empty on 2nd page , lfname on third page supposed come out "llllllll, ffffffff" comes out "llllllllll," no fname @ end...
i can't understand why full code not executed... interesting lname runs validation part of code not copying other fields.
lname field
fname field
let me know if need more info.
regards,
jeff p...
if understand things correctly, should replace these 2 lines:
getfield("hfname").value = getfield("fname").value;
getfield("lfname").value = getfield("lname").value + ", " + getfield("fname").value;
with following:
getfield("hfname").value = event.value;
getfield("lfname").value = getfield("lname").value + ", " + event.value;
More discussions in JavaScript
adobe
Comments
Post a Comment