Order from

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #13809
    Michael Maccar
    Participant

      Hi Olly
      Is it possible to hide some fields in the order form like address or post code when pick up is selected ?

      there is a bit of confusion when customers choose pick up but also write the whole address in the form although it’s not required .

      thank you

      #13811
      Olly
      Admin & Mod

        just use the css selectors.
        example selecting required inputs and labels

        
        #wppizza-customer-details input[required] {
        background-color: yellow;
        }
        #wppizza-customer-details .wppizza-order-label-required {
        background-color: green;
        }
        

        obviously, you can set all of them to hidden first for example and override the required with the above…
        something like that ayway

        #13812
        Olly
        Admin & Mod

          something along these lines

          
          /**add all the elements you are using, so for example, for cname and cemail, something like this*/
          #wppizza-customer-details #cname, #wppizza-customer-details #cemail{display:none}
          #wppizza-customer-details label[for="cname"], #wppizza-customer-details label[for="cemail"]{display:none}
          #wppizza-customer-details input[required],#wppizza-customer-details .wppizza-order-label-required  {
          display:block !important
          }
          
          #13816
          Michael Maccar
          Participant

            is there any code like the above can totally hide specific labels once pickup is selected ?, Still like the above idea though

            #13818
            Michael Maccar
            Participant

              just saw your second post I will try it soon

              #13828
              Michael Maccar
              Participant

                works like magic 🙂 Thank you so much .

                #48736
                Olly
                Admin & Mod

                  just a quick update on the above , as this is somewhat easier now with wppizza v3.something

                  you can target elements when pickup is selected like so (assuming here you want to hide the name and address for example)
                  use your browsers element inspector to ascertain whats the exact classname you need

                  
                  .wppizza-order-ispickup .wppizza-personal-details > .wppizza-cname{display:none}
                  and/or
                  .wppizza-order-ispickup .wppizza-personal-details > .wppizza-caddress{display:none}
                  and/or 
                  etc etc 
                  

                  make sure to not hide things that you have also set to be “required” though or the customer will never be able to check out ….

                Viewing 7 posts - 1 through 7 (of 7 total)
                • The topic ‘Order from’ is closed to new replies.