FamilyTree editIndivid.php - jcobban/Genealogy GitHub Wiki
Up: Family Tree Implementation
This script displays the main page for editing the attributes of an instance of Person.
It is invoked by method='get'
and supports the following parameters.
parameter | description |
---|---|
id or idir |
The unique numeric identifier of the instance of Person . For backwards compatibility this can be specified using the 'id' parameter. If this parameter is omitted or is 0 it is a request to create a new instance of Person . |
treename |
The name of family tree in which to create the Person if idir is zero. The default is the empty string. |
idmr |
When adding a Person as a child of a family this parameter supplies the unique numeric identifier of the associated instance of Family. parentsidmr is a synonym for this parameter. |
idcr |
When editing a Person as an existing child of a Family this parameter supplies the unique numeric identifier of the associated instance of Child. |
rowid |
This is the value of the id parameter identifying the row on the associated page displayed by either editMarriages.php or editParents.php when the user requests to edit either the Husband/Father or Wife/Mother. The expected values are 'Husb', 'Wife', 'Father', or 'Mother'. |
The following parameters may be passed to supply information that may not yet have been written to the database because the Family record is in the process of being created: |
|
initSurname |
initial surname for a child. This is usually the father's surname. |
fathgivenname |
explicit father's given name |
fathsurname |
explicit father's surname |
mothgivenname |
explicit mother's given name |
mothsurname |
explicit mother's surname |
lang |
the requested language of communication as a BCP 47 identifier. |
The following parameters may be specified on an invocation of this page using Javascript window.open to request the page to update the values of specific fields in the invoking page when the user submits an update. Because these fields refer to the values of the name= of <input> tags the case is sensitive. |
|
setidir |
field name in which to place the unique numeric key of the new instance of Person |
Surname |
field name in which to place the surname of the new instance of Person |
GivenName |
field name in which to place the given names of the new instance of Person |
Prefix |
field name in which to place the name prefix of the new instance of Person |
NameNote |
field name in which to place the name note of the new instance of Person |
Gender |
field name in which to place the gender of the new instance of Person |
BirthDate |
field name in which to place the birth date of the new instance of Person |
BirthLocation |
field name in which to place the birth location of the new instance of Person |
ChrisDate |
field name in which to place the christening date of the new instance of Person |
ChrisLocation |
field name in which to place the christening location of the new instance of Person |
DeathDate |
field name in which to place the death date of the new instance of Person |
DeathLocation |
field name in which to place the death location of the new instance of Person |
BuriedDate |
field name in which to place the burial date of the new instance of Person |
BuriedLocation |
field name in which to place the burial location of the new instance of Person |
UserRef |
field name in which to place the user reference value, a string, of the new instance of Person |
AncestralRef |
field name in which to place the ancestral reference value of the new instance of Person |
DeathCause |
field name in which to place the death cause of the new instance of Person |
... | or, in general, any field name in the invoking page. |
A parameter with a name starting with 'init' can be used to initialize the value of a field matching the remainder of the parameter name if a new Person is being created. Note that the field name portion of these parameters is case-insensitive. In particular: |
|
initSurname |
set initial value for the surname |
initGivenName |
set initial value for the given names |
initPrefix |
set initial value for the name prefix |
initNameNote |
set initial value for the name note |
initGender |
set initial value for the gender |
initBirthDate |
set initial value for the birth date |
initBirthLocation |
set initial value for the birth location |
initChrisDate |
set initial value for the christening date |
initChrisLocation |
set initial value for the christening location |
initDeathDate |
set initial value for the death date |
initDeathLocation |
set initial value for the death location |
initBuriedDate |
set initial value for the burial date |
initBuriedLocation |
set initial value for the burial location |
initUserRef |
set initial value for the user |
initAncestralRef |
set initial value for the ancestral |
initDeathCause |
set initial value for the death cause |
The following parameter is used by the dynamic functionality in editIndivid.js. | |
testsubmit |
The database is always updated by invoking the script updatePersonJSON.php. Normally this is done through an AJAX request to the server, and once the response is received the instance of Person is displayed by passing control to Person.php. However if you add the parameter testsubmit=Y then the JSON document describing the update is displayed. |
For example:
To see an example of this page in action go to the demonstration site.
Next: editMarriages.js