FormFieldRef
Kind: class
Module/package: models
SDK: pdfdancer-client-python 2.0.0
Reference to a form field object with name and value.
Parameters (usually provided by the server):
- internal_id: Identifier of the form field object.
- position: Position of the field.
- type: One of
ObjectType.TEXT_FIELD,ObjectType.CHECKBOX, etc. - name: Field name (as defined inside the PDF).
- value: Current field value (string representation).
Usage:
- You can pass a
FormFieldReftoChangeFormFieldRequestto update its value.
payload = ChangeFormFieldRequest(object_ref=field_ref, value="[email protected]").to_dict()
Declaration
FormFieldRef(internal_id: str, position: pdfdancer.models.Position, type: pdfdancer.models.ObjectType, name: str | None = None, value: str | None = None) -> None
Members
__init__
__init__(self, internal_id: str, position: pdfdancer.models.Position, type: pdfdancer.models.ObjectType, name: str | None = None, value: str | None = None) -> None
Initialize self. See help(type(self)) for accurate signature.
get_internal_id
get_internal_id(self) -> str
Returns the internal identifier for the referenced object.
get_name
get_name(self) -> str | None
Get the form field name.
get_position
get_position(self) -> pdfdancer.models.Position
Returns the current position information for the referenced object.
get_type
get_type(self) -> pdfdancer.models.ObjectType
Returns the type classification of the referenced object.
get_value
get_value(self) -> str | None
Get the form field value.
set_position
set_position(self, position: pdfdancer.models.Position) -> None
Updates the position information for the referenced object.
to_dict
to_dict(self) -> Dict[str, Any]
Convert to dictionary for JSON serialization.
object_type
object_type: pdfdancer.models.ObjectType
Return the object type using the public object naming convention.