I have made a simple submit form (https://www.sapul.sk/pracovne-ponuky-formular) to collect job offers in repeater , table and in dynamic pages.
Now i struggle to collect and display the data. When I thought everything worked perfectly I found out our members where not able to submit the form.
I have realized that in order to show data on my website I need to change form permissions to “Site Content”, however regular visitors or site members cannot submit form which is connected to database with “Site content” permissions.
So I had to change permissions to “Form submission” and that is the root of the problem, as data are not displayed in repeaters or dynamic pages from this type of collections.
I have followed instructions in this video:
But this video does not display how to show content on other pages or dynamic pages. I need the content from form to be immediately displayed on live page.
Here is the code:
import wixData from 'wix-data';
function getData() {
let query = wixData.query('JobOffers');
return query.limit(1000).find().then(results => {
console.log('getData', results);
return results.items;
});
}
$w.onReady( () => {
$w("#JobsForm").onAfterSave( () => {
getData().then((items) => {
});
});
Is there a simple way of how to achieve what I need? Because otherwise I will just collect and insert the data manually as I am not expecting a huge flow.
Thanks for your help.