Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Renaming Fields |
Post Reply |
Author | |
PDFNow
Beginner Joined: 20 Dec 11 Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 14 May 19 at 8:42AM |
Hi.
We got an PDF with Formfields (Parnents and Childs). Now we are renaming the Childfields, so there is no connection anymore to the parent field. We using "SetFormFieldTitle" to rename and it works. But not in a way we like to. Example: Before renaming Parentfield = "Textbox1" Childfield = "Textbox1." After renaming Parentfield = "Textbox1" Childfield = "Textbox1.NewName" We just want the NewName as FormFieldTitle without the Parentname. Our QuickPDF Version is 11.15. Wolfgang
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Wolfgang,
you should read in the online reference in the description belonging to SetFormFieldTitle;-) There you can read "...renames the title of a parent form field...". Additionally: "...you have to make sure that the name is unique...". But this is NOT for child fields. BTW: I don't know that you've extracted the complete form field name. Don't know if only QuickPDF has probs with more than one field with the same name but i don't think that your pdf has one name twice? There's no functionality in the library to rename child fields. What you can do ( i wouldn't do this) is to remove the child field and use NewChildFormField: https://www.debenu.com/docs/pdf_library_reference/NewChildFormField.php ...with a new title. |
|
Cheers,
Ingo |
|
waynefulcher
Senior Member Joined: 23 Jun 08 Location: United States Status: Offline Points: 99 |
Post Options
Thanks(0)
|
You actually can rename a child field. After some searching I found the solution at the bottom of this post, however if I understand your question then you have the exact same issue I have which is not so much renaming a child field but to remove the "parent" leaving only the child field as a normal field.
As Ingo mentioned this could only be done if you do not have duplicate fields with the same name. In my case I have a PDF and whoever created the fields didn't realize the implication of using periods (.) in the field names. What I want to do is take the following fields: Beneficial.Owner (parent) Beneficial.Owner.Name (child) Beneficial.Owner.Address (child) and delete Beneficial.Owner and then replace periods with underscores for the other fields leaving me with only: Beneficial_Owner_Name Beneficial_Owner_Address I am working on a solution for this so if you figure out anything let me know, otherwise if I figure it out I will post it here.
(Solution for renaming a child field) ================================================ It is possible to rename a form field using the SetFormFieldChildTitle function in Quick PDF Library. It works like this: If you have a parent field called Details, with child fields Name and Address, the full field names will be:
If you wanted to change Details.Name to Details.FirstName you can use:
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Wayne,
good to see users with samples to help and not always questions ;-) Please ... if you want you could put this code into the samples-section as well. Thanks :) |
|
Cheers,
Ingo |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store