Hello Community,
I am trying to populate database records on my website, where users select choices from a series of radio buttons then use a “submit” button. I want this database to store the user’s rsponses in their account (they are members; this site is a members-only page). I can get the form to work in some ways and I can submit data, but I’m extremely confused about several things because it’s not doing what I expect. Ultimately I am trying to make the owner/user as a key field on a form submission. Here are my points of confusion - I would appreciate any help please!
-
The “title” field in the database is set by default as the main field, but it is not populating. I have also seen examples and wix demos where it did not populate. What is this “title” field and why does it not get populated and why do I need it?
-
I want to make the “owner” field (the user key who submitted the form) a primary key, since I only want one database record per user. Am I missing something easy here - or do I need to write custom code to do these saves and checks? Or, is there a way I can add my own “user” field and set it to populate automatically based on the user key, or user email, or username? Or would I also have to write code to get the user info then write it to the database? I have been pulling my hair out for hours/days/weeks trying to configure this but it seems impossible without writing custom code - is it?
-
I have tried setting my database to “Write-Only,” which is the best way to allow first-time users to submit data, which works. However, the problem here is that the user can’t actually see their answers populated back on the next page refresh - everything defaults back to the default selections. I want my users to see their past selection when they log in. I have also tried making my form Read & Write which makes sense to me as what I want - to both display data and insert/update it - however in this case, a new user who does not have any saved data cannot use the form to save any data (the radio buttons on my form are all grayed-out and unusable because it’s not reading any data, since I have it set to read but there is nothing to read). My understanding is that these things are supposed to be easy to set…but this all seems impossible now and I’m feeling in a catch-22 in every way. What do I need to do to make this work?
Thank you for your time!