How do I remove a country once its selected, using the "select country" widget?

  • Profile Image
    j_clayton
    Asked 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.

  • Profile Image
    BJoanna
    Answered on August 10, 2016 at 05:31 PM

    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.  

  • Profile Image
    grade4pagasa
    Answered on August 14, 2016 at 02:12 PM

    Hi j_clayton

    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.