Desync form fields from each other

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

MedBooster
User
Posts: 1372
Joined: Mon Nov 15, 2021 8:38 pm

Desync form fields from each other

Post by MedBooster »

I see that when you copy a form field textbox the javascript stays the same in all.

Is there a way to desynchronize the form fields from each other, or is it about changing the code?
In this case:

Code: Select all

var d = new Date;
event.value = util.printd("dd.mm.yyyy HH:MM:ss", d);
Is it about changing some variables, or is it because I copied the form fields, instead of creating new ones and pasting the code into it?

When changing the javascript code in the 2nd form field it is also automatically changed in the original (1st) form field.

This would be useful in creating dynamic stamps:
viewtopic.php?p=187308#p187308
My wishlist https://forum.pdf-xchange.com/viewtopic.php?p=187394#p187394
Disable SPACE page navigation, fix kb shortcut for highlighting advanced search tool search field, bookmarks with numbers, toolbar small icon size, AltGr/Ctrl+Alt keyboard issues
lev
User
Posts: 280
Joined: Fri Apr 11, 2014 1:18 am

Re: Desync form fields from each other

Post by lev »

Make sure the 2 textboxes have different Field Names.
image.png
You do not have the required permissions to view the files attached to this post.
User avatar
Dimitar - PDF-XChange
Site Admin
Posts: 2261
Joined: Mon Jan 15, 2018 9:01 am

Re: Desync form fields from each other

Post by Dimitar - PDF-XChange »

Thanks for the input, Lev.

This should be the solution, yes.

Regards.