Hi
Is there a way i can create a form where the user enters multiple records in one go example details about all appointments for a day. And another user can choose to see the data for any date range.
If I understand what you are trying to do, I think you can probably do most of it without coding, but you will probably need some coding.
You can have multiple datasets (set to write-only) on the page, each connected to a different set of inputs.
However, the submit button can only be connected to one dataset. In such a case, instead of connecting the button, implement an onClick event for the button that in turn calls for the save method of each of the datasets. Each of the datasets will then create a new record in the database.
Thanks Yoav for your reply. You have understood the requirement correctly. My client wants a Add more rows button that will allow to add multiple rows on a page. On submit all rows should get stored in a database. There will an enquiry option where the user will enter a date range and it should display the relevant records. There are couple of more such data entry and enquiry requirements.
We already have a site on WIx, but to meet these internal requirements do I have to buy one more domain and build all of it on that? This site is internal and I do not want the general public to know about it. How can I achieve this?
Is it possible to create a ‘Add More Rows’ button ?
Yoav,
Does this mean that you can have multiple datasets on a single page (with different Database permissions) with TWO buttons? One button for each set of ‘forms’ inside of this single page?
For example, If my first dataset has the Database permissions of “only author member can view”, but the 2nd dataset has the permission of “anyone can view”… this is possible?
Thanks!
Hi Nayeli,
let me clarify a bit.
you can have as many datasets on your page as you need.
they can connect to the same collection or to different ones.
however, permissions are set on the collection level, not on the dataset level.
permissions are set for a collection when it’s first created, and can later be modified from the “edit permissions” option you have on a collection in the left navigation tree.
permissions are not to be confused with a dataset’s mode .
a dataset can be read-only, read-write, or write only.
but this only affects what you can do with the dataset, not the permissions of the underlying collection.
hope this makes sense,
let us know if you need more information.
thanks!
Ok, Datasets, permissions, got it. Now about the buttons …
How do I make both buttons work on the same page? Code?
Profile - Read&Write (Profile Collection) = A person will view the information they entered & can edit anytime.
New Item - Write Only (Items Collection) = A person will enter a new item on the same page, that will be displayed on another dynamic page.
Currently only the “new item” form/button works correctly. Pictures below for reference
no need for code.
as long as each button is connected to a different dataset, both should be active.
more info:
the way we define a form is “the set of components that are bound to a write or read/write dataset”.
so if you have two datasets, you can have two separate sets of components, and hence two forms.
each set of components (i.e. each form) can have its own submit button.
hope this makes sense.
well I just tested it with a blank page and two forms that submit to two collections via two datasets and it worked.
try it yourself -
- make sure you have 2 collections
- add a blank page
- add two datasets (one for each collection)
- make sure both are write only
- add two input boxes, connect one to each dataset
- add two buttons, connect one to each submit action
- test it
if it works, then there’s something off with the configuration you have on your page…
let me know how it turned out.
Without even trying — I can tell you my “profile” dataset is set to Read&Write. I guess this means I won’t be able to setup the page this way. I need to come up with a different way in organizing the information. Ok — let me think of something else. Thank you so much
well I changed mine to be R/W and it still works
try it, really.