JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How do I remove a country once its selected, using the "select country" widget?Asked by j_clayton on August 10, 2016 at 03:58 PM
I am trying to create a donation form that will allow parents to select a country along with their donation. I found the "select country" widget, but I need to now how to remove the country, once its chosen.
I am not exactly sure what you are trying to achieve. Do you want to remove county from the map on Select Country, so that same country can not be selected by another user?
Unfortunately that is not possible to achieve.
If you want prevent that same country is selected more than once, you can use Appointment Slots widget or Ticket Purchases widget and all list of all country's as possible options and set all available options to 1. This way once some country is selected, it will be unavailable for other users.
Hope this will help. Let us know if you need further assistance.
I took the liberty of creating a bare-minimum working demo for you using 1 of my favorite widgets - the Ticket Purchases. I entered the countries in this widget with a maximum allotment of 1 per country (the list of countries can be modified). A child's parent can only choose 1 country - as you specified. Once a country is selected, that country will show a None as its status and will be disabled. I included only the basic fields to capture the info of the form user (layout of the form can be changed according to your preferences).
I also made some cosmetic changes on the Ticket Purchases widget:
* grayed-out background with maroon font-color for selected countries to make them more conspicuous
* also used the cursor:not-allowed to display a stop sign in selected countries
* black background for the actively selected country (i don't know how to make the green check mark display when a country is currently selected).
* split the widget into 3 columns (with the help of JotForm Support Mike_G)
* overridden the default text-status of the widget (1 Available) to just "Available" (with the help of JotForm Support Kiran)
This is just a working demo and if you intent to clone or copy it, feel free to modify as needed.
Hope this helps.
- Randy, fellow JotForm user.