Need Assistance with Form Submissions Not Appearing in Dataset on Job Board

Question: How can I ensure that form submissions automatically populate the dataset and appear on the job board pages without manual intervention?

Product: Wix Editor

What are you trying to achieve: I have a job board website where employers can submit job postings through a form. The form submissions should automatically populate a dataset and display on the relevant job board pages. Currently, I receive notifications that a form was filled out, but the job postings do not appear on the job board pages unless I manually enter the information into the collections.

What have you already tried:

  1. Connected the form fields to the dataset fields.
  2. Set the dataset mode to “Read & Write.”
  3. Configured the form’s submit button to submit data to the dataset.
  4. Checked permissions to ensure public submissions are allowed.
  5. Verified the form and dataset connections in the Wix Editor.
  6. Implemented the following Velo code for form submission and dataset refresh:

import wixLocation from ‘wix-location’;

$w.onReady(function () {
$w(‘#dataset1’).onAfterSave(() => {
refreshJobBoardDatasets();
wixLocation.to(“This is set to redirect to my domain name”);
});
});

function refreshJobBoardDatasets() {
wixData.query(‘JobPosts’)
.limit(50)
.find()
.then(() => {
console.log(“Job board datasets refreshed”);
})
.catch((err) => {
console.error(“Failed to refresh job board datasets:”, err);
});
}

Additional information:

The form ID is #dataset1.
The dataset is named Job Posts.
The form is connected to fields like Job Title, Company Name, Location, Job Description, Email Address, and a dropdown for selecting the job board.

Permissions are set to allow public submissions.

Any advice or detailed steps to troubleshoot and resolve this issue would be greatly appreciated.

from what you describe the form data is not saving to the CMS collection. Depending on how the form was made I would look into the connection between the form and the collection. Without knowing the whole picture its hard to really pinpoint what the issue may be. Are all the ID of the elements correct, are the field in the CMS correct. Is there some code on the form page preventing the standard connection and the whole form needs to be coded.(I have had this issue many times)
Is the form on a seperate page to the jobs board ? i’m assuming so whith the code above. What code do you have on th ejob board page ?

1 Like

First of all, Thank you Dan for taking the time to respond.

I am experiencing an issue where the form data is not saving to the CMS collection in Wix. The form is designed for users to post job listings, and it should populate the job postings on the job board pages immediately after submission. The form is on a separate page from the job board pages.

Product: Wix Editor

What are you trying to achieve: I want users to be able to submit job postings via a form, and have these postings automatically appear on the appropriate job board page without any manual intervention. The job board pages are set up to display job postings filtered by city.

What have I already tried:

  1. Verified that all field IDs in the form are correct.
  2. Ensured that the form fields are connected to the appropriate fields in the “Job Posts” dataset.
  3. Set up the form submission to redirect users to the homepage.
  4. Checked that the dataset mode is set to “Write-Only” for the form page.
  5. Set the dropdown in the form to collect content submitted by site visitors.
  6. Applied a filter to the job board pages to display jobs based on the city selection.

Additional information: Here is the code currently used for form submission:
import wixLocation from ‘wix-location’;

$w.onReady(function () {
$w(‘#dataset1’).onAfterSave(() => {
refreshJobBoardDatasets();
wixLocation.to(“https://subhubtaiwan.com”);
});
});

function refreshJobBoardDatasets() {
wixData.query(‘JobPosts’)
.limit(50)
.find()
.then(() => {
console.log(“Job board datasets refreshed”);
})
.catch((err) => {
console.error(“Failed to refresh job board datasets:”, err);
});
}

  • The form ID is #dataset1.
  • The job board pages use the following code (example for one city):
    import wixData from ‘wix-data’;

$w.onReady(function () {
let jobBoard = “Taipei”;
let dataset = $w(‘#jobBoardDataset’);

dataset.setFilter(wixData.filter()
    .eq('selectJobBoard', jobBoard)
)
.then(() => {
    console.log(`Filter applied to show jobs for ${jobBoard}`);
})
.catch((err) => {
    console.error('Failed to set filter:', err);
});

$w('#pagination1').onChange(() => {
    dataset.setPageSize(50)
        .then(() => {
            console.log('Pagination set to 50 items per page');
        })
        .catch((err) => {
            console.error('Failed to set pagination:', err);
        });
});

});

Questions:

  • Are there any specific settings or configurations I should double-check in the form and dataset connections?
  • Is there a way to ensure that the data is correctly being saved to the CMS collection upon form submission?
  • Could any of the code or settings be interfering with the standard form-to-dataset connection?
  • Should there be additional settings for the dropdown menu or form submission that I might be overlooking?

Any help or insights would be greatly appreciated. Thank you!

Hello there Dan,

I could still really use your advice. It would be much appreciated.