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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Renaming Fields
  FAQ FAQ  Forum Search   Register Register  Login Login

Renaming Fields

 Post Reply Post Reply
Author
Message
PDFNow View Drop Down
Beginner
Beginner
Avatar

Joined: 20 Dec 11
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote PDFNow Quote  Post ReplyReply Direct Link To This Post Topic: Renaming Fields
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2987
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 19 at 5:15PM
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

Back to Top
waynefulcher View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Jun 08
Location: United States
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote waynefulcher Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jun 19 at 10:14PM
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:

Details.Name
Details.Address

If you wanted to change Details.Name to Details.FirstName you can use:

int FieldID = QP.FindFormFieldByTitle("Details.Name");
QP.SetFormFieldChildTitle(FieldID, "FirstName");
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 2987
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jun 19 at 7:22PM
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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store