Open starapple2 opened 9 months ago
- What is the purpose of the second of the two?
The checkboxes under "This table" are used to display the selected column in the list view of each table.
If you had foreign keys in your schema, you would see "Related tables" in column #2. It would be used to display the selected column when it is referenced as foreign key in another table. Columns keys id, name, reference are checked by default.
Here's an example:
_This will show a countries.name
column on users-index.php (without countries.id
column)_
I have some ideas on how to improve this, will implement in the coming weeks.
- the Show column function
It changes the layout of the table onto the generated "Read" pages (xxxx-index.php). You should already have:
The completed app from the image above would correctly show an HTML table without the account_id column
I've checked the code and I haven't seen any impact on the Create/Edit pages so far. That's a cool idea to implement.
In order to avoid breaking compatibility with existing apps, I suggest that we offer the choice. Sometimes you want a compact table, sometimes a full-fledged form.
Does it make sense? Is the wording clear enough?
We've struggled to find a presentation for this concept (see this comment and below) so any suggestion is welcome.
Is the ID field set depending on whether the column is auto incremented
CREATE TABLE
brands(
idint(11) NOT NULL AUTO_INCREMENT
). The ID is passed via GET so that won't make any difference if we remove the field from the form.
We also need to hide the unchecked columns on xxxx-read.php and xxxx-update.php, right?
- What is the purpose of the second of the two?
You have spotted a glitch in UI, the second column of checkboxes should be only visible when at least one table has a foreign key.
The checkboxes under "This table" are used to display the selected column in the list view of each table.
If you had foreign keys in your schema, you would see "Related tables" in column #2. It would be used to display the selected column when it is referenced as foreign key in another table. Columns keys id, name, reference are checked by default.
Here's an example:
_This will show a
countries.name
column on users-index.php (withoutcountries.id
column)_I have some ideas on how to improve this, will implement in the coming weeks.
I suspected as much that it was related to the presence of foreign keys. The original db as MyIsaam and the two columns of and I thought after reading the user guide that that should not be the case if the tables were InnoDB; so I changed them to InnoDB and the behaviour didn't change.
I think we're on the same page with your 2. re showing/hiding.
Best.
Do you actually have a foreign key?
Does the relation appears (or has been created) on in step2?
A couple of matters of clarification:
The tables I am working with have fields that are restricted to back-end (admin) users after forms are submitted by public-facing users. It seems I would have to edit the generated forms to prevent the showing of fields such as table IDs, account status, time stamps or text areas for admin notes.
In summary, what is the purpose of the second toggle and can one decide what columns are generated as form fields? The completed app from the image above would correctly show an HTML table without the account_id column but the account-create.php would display the account_id field.
Is the ID field set depending on whether the column is auto incremented, because the behaviour isn't consistent with all column IDs? The setting here:
Results in (although other columns not selected also are in the form):