A table (which includes a field called company_name)
A form - which is inputing to the data displayed in this table
The table displays the data in company_name and the field is inserting a new record, including the field company_name
However - when I load the tabbed container /app - the text input - which should be blank, is taking on the data from the first row of the table (because they are named the same).
I tried just renaming the text input field (under Form data key) - but by doing this, the data never inserts into my db.
Hopefully this makes sense and someone can help. It's a simple task I am sure.
Note that if you change the key and NOT the id it may not see the information entered in the input_company_name field... the form field key is self referential...
I'm not sure I fully understand (sorry - very new to this).
But when I tried ot change the field to be {{self.id}} in the form data key field - it didn't work. It indeed did not show the first row of the table - but it didn't insert a record either
OK so you have the table of data, that when a row is selected; the rows column values should be populated into the form to the right and that form should insert a new record to the database?
OR
Is the form submitting new data that the table on the left will eventually display?
ok so you need to make sure that the names of the fields in the form correspond with the columns in the database when using thee GUI mode and inserting an object...
Yes - they do - and the record inserts correctly.
But that is the problem ...... the column in the table is also the same name - so for some reason, the first row in the table is pre-filling the text in put box on the right hand side - and that's what I'm trying to solve...... I don't want that.
So, I removed the Form data key - which stops the problem, but then also stops the insert.......
Hopefully i'm making sense. Happy to send a video if it helps,
Looking through, it does seem like you'll want the form's text input data key to be {{self.id}}
It would be helpful to see exactly what happens with the write query when you change it to {{self.id}} (how does the form data evaluate, is there an error, etc)
Additionally, I'm curious what the form's initial data field is
Tess, could i ask for an explanation on what the Form data key is?
I checked the documentation. But, as a newbie - i couldn't work it out. thanks.
Neil