-
s_cataldo_1Domanda del 17 novembre 2024 alle ore 06:11
Gentile Assistenza Jotform,
sto utilizzando Jotform per gestire le iscrizioni a un evento suddiviso in diverse categorie. Ho un’esigenza specifica legata alla gestione automatica di un limite massimo per una delle categorie del modulo, e vorrei chiedervi aiuto per implementare una soluzione funzionale.
La situazione attuale
• Il modulo accetta iscrizioni per diverse categorie (lupetti, coccinelle, esploratori, guide, ecc.).
• La categoria “lupetti” ha un limite massimo di 24 iscrizioni.
• Il genitore inserisce l’età del partecipante, e in base a questo il campo “Branca” viene automaticamente aggiornato con “Lupetti” (o altre categorie).
• Voglio evitare che gli utenti possano iscriversi come “Lupetti” una volta che il limite massimo di 24 è stato raggiunto.
Esigenza principale
Vorrei configurare un campo nascosto che:
1. Conti automaticamente il numero di iscrizioni già ricevute per la categoria “Lupetti”.
2. Aggiorni questo conteggio ogni volta che viene inviata una nuova iscrizione alla stessa categoria.
3. Blocco automaticamente ulteriori invii se il conteggio supera o raggiunge il limite (24).
4. Tutto questo deve avvenire in modo trasparente per l’utente finale.
Il problema attuale
Ho provato a utilizzare logiche condizionali per aggiornare un campo nascosto (“Conteggio Lupetti”) e bloccare l’invio, ma ho notato che:
• Il valore del campo nascosto si resetta ad ogni nuova iscrizione, non permettendo un conteggio cumulativo tra gli invii.
Vi chiedo quindi se esiste una soluzione per:
1. Salvare e accumulare il conteggio delle iscrizioni in un campo nascosto o in un’altra area.
2. Verificare questo conteggio in tempo reale per applicare condizioni di blocco.
Alternative possibili
Se non è possibile implementare questa funzionalità direttamente nel modulo, ci sono integrazioni o strumenti nativi che mi permettano di accumulare il conteggio in una tabella (o database) e usarlo per bloccare ulteriori iscrizioni?
Ringrazio anticipatamente per il vostro supporto e resto a disposizione per fornire ulteriori dettagli o per ricevere eventuali suggerimenti.
Cordiali saluti.
-
Rene Jotform SupportRisposta del 17 novembre 2024 alle ore 09:02
Hi s_cataldo_1,
Tahnks for reaching out to Jotform Support. Our Italian Support agents are busy helping other Jotform users right now, so I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Italian, let us know and we can have them do that. But, it might take a while until they're available again.
Now, coming back to your question, unfortunately, it is not possible to prevent a form user to fill out a form if a specific limit of possible options have been reached using conditions. What you can use instead is the Gift Registry widget, so you can track the number of registrations made for an option. Once the limit has been reached, that option will be blocked for any potential registrations. Let me show you how:
- In Smart PDF Forms, click on Add Element on the left.
- Go to the Widgets tab.
- Look for Gift Registry and add it into your form. You can add it below the field 'Branca'
- In the Widget Settings, add the list of options you want form users to select.
- Beside each option, put a curly bracket beside it, with a number inside. This is to indicate the number of slot that can be registered upon selecting and submitting the form. An example is Cubs{24}.
- Put the Max Selection to 1, and manage the other options like None Available.
- Click on Update Widget once done.
- Next, click on the widget's Gear icon.
- Go to the Advanced tab and update the Field Label. You can name it Branca as well, or any other name. The sample below is just to indicate its connection to the hidden field 'Branca'. This is also to make form users aware on which branch they should select for the registration.
Since you're using a Smart PDF Form, unfortunately widgets can't be mapped. That is why it will only be used so that form users can have a visibility of the selection they can have to register their kids, and select from. This will also let them to know how many available slots left are for each selection, or branch. The original hidden field 'Branca' that's already set in your form will be the one to be indicated in the PDF submission of the form, so form users will have a copy of the data they've submitted. That's the one mapped in the original PDF. Check out the sample submission below showing the selected branch (Cubs), and how the availability will look like after submission:
Give it a try and let us know if you have any other questions.
-
s_cataldo_1Risposta del 18 novembre 2024 alle ore 04:32
Hi Jotform Support,
Thank you for your previous response and suggestions regarding the Gift Registry widget. While I appreciate the workaround, my use case requires a slightly different setup that fully automates the registration process while keeping all underlying calculations and limitations hidden from the form users.
Here’s the detailed flow of what I’m aiming to achieve:
Scenario- Form Submission Based on Age:
- Parents fill out the form to register their child.
- The system automatically assigns the child to a category (e.g., "Lupetti") based on the age entered by the parent. Parents do not manually select the category themselves; this assignment is automated.
- Automated Count of Registrations:
- Once the form is submitted, the data is sent to Google Sheets.
- In Google Sheets, the number of registrations for the "Lupetti" category is calculated automatically using a formula like COUNTIF.
- Pre-Fill of Updated Count in Subsequent Form Submissions:
- The count of registrations (e.g., 24 for "Lupetti") is passed back to the form via a hidden, pre-filled field using the integration with Make (Integromat).
- Conditional Logic for Error Message:
- If the pre-filled count in the hidden field indicates that the "Lupetti" category has reached the limit (e.g., 24), the form will:
- Display an error message to parents, such as: "Le iscrizioni alla categoria 'Lupetti' sono chiuse. Il tuo nome è stato aggiunto alla lista d'attesa."
- Prevent registration to the "Lupetti" category but allow parents to submit the form for other categories.
- Hidden Logic:
- Parents should not see the count or the technical details. All they should see is the error message if the limit is exceeded.
- Pre-Fill Hidden Field with External Data:
Is it possible to pre-fill a hidden field in the form with the count value from Google Sheets, updated in real-time via an integration like Make?
Let me know if these functionalities can be implemented using Jotform and an external tool like Make, or if you have alternative suggestions for achieving this goal.
Thank you for your time and assistance.
Best regards
-
Myla Jotform SupportRisposta del 18 novembre 2024 alle ore 07:12
Hello s_cataldo_1,
If I understood what you’re asking, you want to be able to limit the submission to 24 and getting the count from your Google Sheet Integration? Unfortunately, this is currently not possible. The Google Sheet Integration only works one-way. This means, when a form submission is made, it sends the data to your sheet but if there is any formula or changes on your Google Sheet, it does not sync back to your Submission Table. The closest way to achieve this is with my colleagues' suggestion for the Gift Registry widget. Also, if you do not want your form users to see the limitation for the registration, it is possible to hide the remaining slots with CSS.
Give it a try and reach out again if you have any other questions.
-
s_cataldo_1Risposta del 19 novembre 2024 alle ore 11:55
Dear Jotform Support,
Thank you for your previous response and suggestions. However, the solution with the "Gift Registry widget" does not fully meet my needs. My requirement is to automate the registration process while keeping all calculations and registration limits hidden from parents, and automatically pre-fill a form field based on the registration count.
Desired Flow:- Automatic Registration Based on Age: When parents fill out the form, the system automatically assigns the child to the "Lupetti" category based on the age entered. Users do not manually select the category.
- Registration Count: When the form is submitted, the data is stored in Google Sheets, where the number of registrations for the "Lupetti" category is automatically calculated using a formula like COUNTIF.
- Pre-Fill the Next Form: After each submission, the registration count for "Lupetti" is used to pre-fill a hidden field in the subsequent form, so the form can display an error message such as: “Registrations for the 'Lupetti' category are closed. Your name has been added to the waiting list.”, when the number exceeds 24.
- Conditional Logic: When the hidden field (containing the count) is pre-filled with the updated value (e.g., 24), the form will show the error message and prevent further registrations for the "Lupetti" category. The users will not see the count or technical details, only the error message.
- Is it possible to use the Jotform API to pre-fill a hidden form field with the real-time registration count value (e.g., the count stored in cell F1 of Google Sheets)?
- How can I set up a Google Apps Script to send the registration count value to Jotform via the API and pre-fill a hidden field in the form?
Essentially, I am trying to implement this flow using Google Sheets and Google Apps Script to automatically send the registration count to the Jotform form via the API. I need to know if this integration is possible, and if so, what the correct method is to send the data (e.g., via an HTTP POST request).
Thank you in advance for your support and any suggestions you can provide to help me achieve this goal.
Best regards.
-
Jovito Jotform SupportRisposta del 19 novembre 2024 alle ore 14:44
Hi s_cataldo_1,
Unfortunately, it is not possible to trigger Google Apps Script with our Google Sheets integration, and we cannot use a Google Sheet file's data to prepopulate fields in a form, can only send information to the Google sheet from a form submission. I would suggest you check out onChange event trigger.
Also, you can explore using the Spreadsheet to Form Widget, wherein you can use an Excel sheet file to dynamically autopopulate fields based on the data available to the connected file. The only difference is that the file itself is static, and not a dynamically updating live file.
Reach out again if you have any other questions.