


Hi Everyone,
i have a normal text field and a Add Field button in my form. If someone enters information in the text field, how do i make it such that when they click the Add Field button, a new field is added (but with default the same information that was entered earlier), and they can choose to overwrite the information on the subsequent repeated filed?
Many thanks.
Ray
Views
Replies
Sign in to like this content
Total Likes
Presuming that your subform and text field are called sfInfo and tfInfo, respectively, here's my solution to this problem:
btnAdd::click
sfInfo.instanceManager.addInstance();
xfa.resolveNode("sfInfo["+ (sfInfo.instanceManager.count-1) +"].tfInfo").rawValue = xfa.resolveNode("sfInfo["+ (sfInfo.instanceManager.count-2) +"].tfInfo").rawValue;
Views
Replies
Sign in to like this content
Total Likes
Hi jasotastic81,
thanks a lot for your reply. Sorry i am not good with programming skills, which part should i add this script?
Thanks!
Views
Replies
Sign in to like this content
Total Likes
It should be in the click event for your button. Remember, you'll need to change the object names in the script to match what you've got in your form. Also, that first line "btnAdd::click" was just to let you know what event it should be in.
Views
Replies
Sign in to like this content
Total Likes
Hi jasotastic81
thanks for your advise, i am still testing out the above.
However i have some new questions on repeating subforms, i believe you are an expert in this field and i wonder if i reach you through your personal email address? I would like to send a form to ask you for some advise if you dont mind!
Ray
Views
Replies
Sign in to like this content
Total Likes