Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

use field type select if a field has an foreign key #26

Open
zukunft opened this issue Jun 5, 2014 · 0 comments
Open

use field type select if a field has an foreign key #26

zukunft opened this issue Jun 5, 2014 · 0 comments

Comments

@zukunft
Copy link
Collaborator

zukunft commented Jun 5, 2014

If a field is a reference to another table, the default parameters for this field should be a selection. This way for example these lines would not be needed any more in the mask code

    $this->fields->subtable_id
        ->setLabel("Please select")
        ->setType("select")
        ->setSource(P4A::singleton()->subtable)
        ->setSourceDescriptionField("description");

For the default description field probably the best is to use the first non key field in the subtable. Additional the default setting should be to include a NULL key with the description "not set".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant