Text box not showing default value

I have a table with some data. There is an edit icon in this table, when clicked, a modal will open up with values in the table. But my textbox is not opening with the default value. It shows at the initial time i set 'default value' option and never shows it afterwards.
I hope someone can help me with this.
Thanks!

Can you share a screen shot of the table as well?

The behavior you see is correct. If you are editing a cell and then opening a modal after editing the cell but NOT updating the data into the source/database, then the modal will only show what is originally in the table when it first loads.
You have to edit the table, submit the data/changes, reload the table and then select the row and open the modal..... that is...if I am reading your question correctly

Shouldn't the Form data key be alert_name instead of table25.selectedRow.alert_name? Also, is the text input within a form?

1 Like

I know what you mean. This is my scenario.
There is a form to add some details. So when you save the details to the db, i would take form20.data (Json) and save to db. The keys will be the component name.
But, if i need to edit the same in another window, since the component name is different, adding the form data key is not useful.
Or, do you have any suggestion to use one form for add and edit details. When we edit, i click on my table in edit button. When clicked, i currently read current_row

I'm not sure I'm completely following

Property or component? If component, {{ self.id }} would return textInput1 for example.

Are you using the Data source property to populate the form? That's what I normally use instead of Default value of each component.

May be i'm missing some core concepts related to forms, form id. Can you give some ref? Then i can ask more clearly.
thanks!

1 Like

I did notice that doc looks out of date. It has legacy table notation.

With new table
Screenshot 2023-11-09 at 8.28.47 AM
and then
Screenshot 2023-11-09 at 8.32.29 AM

In legacy table {{ table1.selectedRow.data }} returned undefined and new table {{ table1.selectedRow }} returns null when no row is selected.

1 Like

Suppose i have formx inside a modal. The data source of formx is {{mytable.selectedRow}}.
I have few other text fields inside the form. So, can i use form_key inside the text fields to automatically map the values?

I am not using the data source field I am only directly pulling in the field I want populated with data from the selected Row