SolidJSS
SolidJSโ€ข4mo agoโ€ข
2 replies
FatFreeButter

Two-way-binding

I have a form with several fields that need to be pre-populated with values from the database on initial page load. When the user submits the form, the new values will be saved to the database. The latest values should always be displayed when the page is reloaded.

If I'm not mistaken, I know I need to use createResource(...) to query the database. This returns a signal which I can use to populate the <input> and <select> HTML elements.

The easiest way for me to populate a select element is by passing a value to its value property.

continued in comments...
Was this page helpful?