Region
HYDRA
Website
Address
Phone number
Hours
Further detail
Feat artist 1
Exhibition name 1
January
10th
2018
How to ask your visitors for Start/end Dates
Obviously you can redesign the user input elements to make them look nicer then the below example.
Connect to start Month column
Connect to start Day column
Connect to start Year column
Connect to end Year column
Connect to end Day column
Connect to end Month column
Custom design display
This is how you would set it out on the repeater. 3 different text boxes (designed a lot nicer then my example) and on each text connect element to correct database column.
[January - Month column]
[ 10th - Day column]
[ 2018 - Year column]
Then we can filter the search bar on the Galleries page to search the database Month field, and show all correct and relevant data.
Currently the date search field cannot search for months as your dat/time setout in the database also includes time which cannot be added into the search bars "Value" which is what is searched in the database.
Example; Search month [Label - January] [Value 01/10/2018 22:00]
As you can see it is too specific and will not bring up any relevant data for that search.
Date & Time format for repeater
Tried using this code below but received constant errors. As explained above though once you seperate the asking values of date/time it will look exactly how you want.
$w.onReady(function () {
$w("#repeater1").onItemReady( ($w, itemData, index) => {
const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
console.log(itemData.trail_at);
console.log(itemData.trail_at.getDate().toString());
console.log(monthNames[itemData.trail_at.getMonth()]);
console.log(itemData.trail_at.getFullYear().toString());
console.log(itemData.trail_at.getHours().toString());
console.log(itemData.trail_at.getMinutes().toString());
const strDate = itemData.trail_at.getDate().toString();
const strMonth = monthNames[itemData.trail_at.getMonth()];
const strYear = itemData.trail_at.getFullYear().toString();
const strHour = ("0" + itemData.trail_at.getHours().toString()).slice(-2);
const strMinute = ("0" + itemData.trail_at.getMinutes().toString()).slice(-2);
$w("#text72").text = strDate + " " + strMonth + " " + strYear + " | " + strHour + ":" + strMinute;
});
});
We did find a code that worked to reformat the date/time but it kept the same date/time on all repeaters. Unfortunately a lot of forums have been saying it doesn't work with Wix, however i did also find some people that tried it and said it works to some degree.
SEARCH BAR
I think having the search by Month and Location is the best way to show people what's on and where it's located at that month and they can then see all the options.
Sometimes having a search that is too refined such as filtering by [Month | Gallery Name | Location] will actually work negatively and show less results if any, especially if they don't know exactly what they are looking for or the gallery names.
We can provide an additional 2 search options for gallery name and Artist but not connect them together so it isn't a filters search, but more of an overall search.
Submission Form - Images in repeater
After having a look at some issues you were having that needed troubleshooting, i noticed a few minor erroes that have been fixed.
Images not feeding into repeater - If you look into your database you will see some images are missing and others are blank, this is where you need to upload some images or fill in the blank spots.
Submission form not connecting - Some of your input field did not connect the value to the database. Always ensure when using data input fields to not only connect it to the dataset, but also connect the Value.
Billing and payment info
I'm more then happy to continue work on Monday for you and fixing things up :) As explained via email the coding project and some other minor things would be $150. You will not need to pay this now, but we can sort it out some time next week.
All of your smaller troubleshooting errors were free of charge. We can also set up the email notification and allow visitors to get a email after their submission for $69.95 if you're keen to proceed with that.
User select Day/month/year, each dropdown saving in it's own column via the database.
Your content has been submitted
Dropdown values are combined, and placed in the above user input element. This element is then saved in the database on it's own column as the full date (1st January 2018) Allowing you to easily reformat the date to how ever you want, without have to individually add each text on the repeater.
How to send full HTML Formatted emails with SendGrid API, we will need to place "TEXT" with "HTML" like so:
`from=${Sender}&to=${Recipient}&subject=${Subject}&html=${Body}`;
Code to add multiple recipients in the email submission. In the sendGrid.jsw file, change the line that begins with const data to the following two lines:
const recipients = recipient.split(";").map( (x) => "to[]=" + x + "&" ).join(""); const data = `from=${sender}&${recipients}&subject=${subject}&text=${body}`;