The issue I'm facing is that the repeat function only iterates once, and it seems like the rest of the code or the database insert is only processing a single entry. I’m not sure if I’ve missed something or if there’s an error in my approach.
You probably need to convert it to number first with the toNumber formatter so that you can loop so many times. Otherwise default form fields are all strings and it will loop for the length of the string so just once in your case
dmx.Formatter('string', 'monthDays', function(val) {
// Extrahiere den Monat und das Jahr aus der URL
const date = moment(val, 'MMMMYYYY'); // 'val' ist z.B. 'may2024'
// Extrahiere den Monat und das Jahr
const month = date.format('MMMM'); // Gibt den vollständigen Monatsnamen zurück, z.B. 'May'
const year = date.format('YYYY'); // Gibt das Jahr zurĂĽck, z.B. '2024'
// Berechne die Anzahl der Tage im Monat
const daysInMonth = date.daysInMonth();
// Konvertiere den Monatsnamen in eine Zahl (1-12)
const monthNumber = date.format('MM'); // 'MM' gibt den Monatswert als Zahl zurĂĽck, z.B. '05' fĂĽr May
// Gib ein Objekt mit Monat, Jahr und Anzahl der Tage zurĂĽck
return {
month: month,
monthNumber: monthNumber,
year: year,
daysInMonth: daysInMonth
};
});
Please create a setvalue step in your server action, give it a name, assign the $_POST.tages variable value to it and enable output.
Check the response in the dev tools > network tab > XHR to see what the setvalue step returns. Post a screenshot here.
sorry i am not sure i understand what is server-connect:app in your explanation.
Can you please post a screenshot of the output you see for the setvalue step in the network > xhr tab and also how is your repeat configured.