Would it be possible to have all my members, with their dynamic profile pages, submit a form to enter their own database?
Thank you!
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
@Ido (Wix) I was brought here by a Wix representative, I have a problem similar to the one you helped with here that I was hoping you would take a second to check out. Below is the link to the post or I think the post lives on my profile as well.
Would really appreciate it if you had a second to check out my post and see if you have a few tips for me.
Best,
Parker
'Required' form field attribute apparently doesn't work with dynamic pages; why I need help. Who knew! Thanks.
What needs to be added to make a field entry required? Thanks.
Hi,
It is not possible to create a collection dynamically, however you can submit form data and place it as as object inside a collection record. You can achieve that by writing code.
Read the form and place the information inside an object, and add this object to a field in the toUpdate object, then update the collection with the form information.
I have made a code skeleton below:
import wixData from 'wix-data'; export function submit_click() { //find the user's ID by querying the email with wixData query //wixData.query('members').... const userId = 'id result from query'; //obtain the info from the form const name = $w('#nameInput').value; const number = $w('#numberInput').value; // add more fields here //construct the item let formObject = { "name": name, "number": number //add more fields here }; let toUpdate = { "_id": userId, "formSubmissionResult": formObject //add more fields here }; wixData.update("members", toUpdate) .then( () => { //update complete } ) .catch( (err) => { let errorMsg = err; } ); }
Good luck