• Resolved ciccione82

    (@ciccione82)


    Hi,
    I’ve the following problem with a conditional field. I created a conditional field (select option).
    Depending on the answer the user have to enter the necessary data. If you choose the first option you do not have to enter the second answer. The problem: When user chooses one of the option, the system asks also the other answer. How can I create choices alternately required? Eg. Are you A or b? If you are A then write bla bla(required) instead if you are B write bla bla bla(required).

Viewing 8 replies - 1 through 8 (of 8 total)
  • StellaQ

    (@stellaq)

    I use WooCommerce Checkout Manager for this purpose and it works well. You can find instructions at: https://www.visser.com.au/documentation/woocommerce-checkout-manager/usage/#Adding_Conditional_Checkout_Fields

    Thread Starter ciccione82

    (@ciccione82)

    I used instructions. It works properly, but when I choice an option the other options are also required so the form do not go on. ??

    • This reply was modified 8 years ago by ciccione82.
    Thread Starter ciccione82

    (@ciccione82)

    Please help me ;(

    StellaQ

    (@stellaq)

    Are you able to provide a link to your website?

    This is how I set it up:

        I chose “Radio Buttons” type for the field (This has to be a question with a “yes” or “no” answer and has to be setup using ||s) that triggers the additional hidden fields to be shown (for a “yes” answer). You can also use the “Selection Options” type with yes/no answer.
        I noted the Abbreviation for this field (This will have the format myfieldxx where xx is a field number assigned by WooCommerce Checkout Manager)
        Then I clicked on “More Toggler”
        Next I clicked on the word “Conditional” in the blue block in the header
        Only for the radio button field mentioned above, I selected both “Conditional” and “Conditional Parent” checkboxes
        In the “Conditional Tie” box for this radio button field, I typed in the previously noted myfieldxx
        For the fields I wanted displayed only when “Yes” was selected (for the radio button field), I selected the “Conditional” checkbox (leaving the “Conditional Parent” checkbox blank)
        Finally, I entered the previously noted myfieldxx in the “Conditional Tie” box(es) for the fields in the step above and saved my work

    And that was it! Let me know if this clarifies the set up for you. Thanks!

    Thread Starter ciccione82

    (@ciccione82)

    Yes, but my answers are required so it do not works properly. This is a test article to buy.article. When you arrive to checkout you can see: “Dettagli di fatturazione. Sei un privato cittadino, un’azienda o un libero professionista?” Test it to know the problem.

    StellaQ

    (@stellaq)

    I see your problem. You want your customers to select between three fields (private citizen, company, freelancer), and depending on the answer, you want to show or hide certain fields. As I understand it, I don’t think this is possible with this plugin. I think you can only ask questions of the type, “are you a freelancer?” with a yes or no answer.

    Perhaps someone else who has more experience with this plugin or its author(s) can give you more insight.

    I don’t know of any other WooCommerce extension that does this but a solution like this one may work for you:
    https://stackoverflow.com/questions/37099213/conditionally-unset-checkout-field-in-woocommerce

    mz83

    (@mz83)

    @ciccione82 penso di aver risolto
    per fare in modo che ad opzione corrisponda uno specifico text field nel campo “choosen value” del selettore devi inserire i valori “valore1” || “valore2” || n volte tante quante sono le opzioni… In pratica la stessa cosa che fai in opzioni toggler, ma nel campo chosen value.
    spero di essere stato comprensibile
    ??

    I have almost exactly same problem.
    Did you manage to solve it?

    /Thomas

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Conditional field problem’ is closed to new replies.