Required Custom Customer Fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lesliekirk
    Super Moderator











    • Aug 2008
    • 9289

    #1

    Required Custom Customer Fields

    To have the ability to make a Custom Customer Field required with the check of a box similar to the radio button ability to make a Store Setting > Customer Fields Hidden, Required or Optional.

    It would also be nice to have the ability to have a Custom Field that could collect a fee.
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: X | Facebook | Pinterest
  • heatherwebdev
    Mivite

    • May 2017
    • 157

    #2
    I've had success using jquery for custom field validations, and using tool kit's upcharge feature to add a fee to a custom field

    Comment

    • lesliekirk
      Super Moderator











      • Aug 2008
      • 9289

      #3
      Originally posted by heatherwebdev View Post
      I've had success using jquery for custom field validations, and using tool kit's upcharge feature to add a fee to a custom field
      Yeah, but we are being pushed away from using third-party modules. Case in point, the two that were being used in the MMUI store are now not working in the CSSUI store. I do agree that jquery for the validation would be the way to go. It would be great to tie into and improve how Miva validates the Customer required fields.
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: X | Facebook | Pinterest

      Comment

      • kayakbabe
        Mega Mivite




        • Jun 2008
        • 1520

        #4
        It would also be nice to be able to define exactly what can be entered into a custom field. If we could have regexp filters or something we can define for them.

        or at least be able to say numbers, alphanumeric, yes/no, etc.

        Comment

        • Bruce - PhosphorMedia
          Developer Partner











          • Mar 2006
          • 11256

          #5
          Originally posted by lesliekirk View Post

          Yeah, but we are being pushed away from using third-party modules. Case in point, the two that were being used in the MMUI store are now not working in the CSSUI store. I do agree that jquery for the validation would be the way to go. It would be great to tie into and improve how Miva validates the Customer required fields.
          FYI Just did this on a site this morning:

          Code:
          In basketcharges loop
          
          <mvt:if expr="l.settings:charges:descrip">
             <mvt:assign name="g.dontUpcharge" value="'Yes'"/>
          </mvt:if>
          
          Then outside:
          
          <mvt:if expr="l.settings:customer_clicked_checkbox AND NOT g.dontUpcharge">
          
             <mvt:assign name = "l.basketcharge:basket_id"  value = "g.basket:basket_id" />   
             <mvt:assign name = "l.basketcharge:module_id"  value = "'999'" />
             <mvt:assign name = "l.basketcharge:type"    value = "'MISCFEE'" />
             <mvt:assign name = "l.basketcharge:descrip" value = "'Misc. Fee'"/>
             <mvt:assign name = "l.basketcharge:amount"  value = "'5.00'" />
             <mvt:assign name = "l.basketcharge:disp_amt"   value = "'5.00'" />
             <mvt:assign name = "l.basketcharge:tax_exempt" value = "'0'" />
          
             <mvt:do file="g.Module_Library_DB" name="l.success" value="BasketCharge_Insert(l.basketCharge)" />
          
          <mvt:elseif expr="NOT(l.settings:customer_clicked_checkbox AND g.dontUpcharge">
          
             <mvt:assign name = "l.basketcharge:basket_id"  value = "g.basket:basket_id" />   
             <mvt:assign name = "l.basketcharge:module_id"  value = "'999'" />
             <mvt:assign name = "l.basketcharge:type"    value = "'MISCFEE'" />
             <mvt:assign name = "l.basketcharge:descrip" value = "'Misc. Fee'"/>
             <mvt:assign name = "l.basketcharge:amount"  value = "'0.00'" />
             <mvt:assign name = "l.basketcharge:disp_amt"   value = "'0.00'" />
             <mvt:assign name = "l.basketcharge:tax_exempt" value = "'0'" />
          
             <mvt:do file="g.Module_Library_DB" name="l.success" value="BasketCharge_Insert(l.basketCharge)" />
          
          </mvt:if>
          Bruce Golub
          Phosphor Media - "Your Success is our Business"

          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
          phosphormedia.com

          Comment

          • lesliekirk
            Super Moderator











            • Aug 2008
            • 9289

            #6
            Originally posted by lesliekirk View Post
            To have the ability to make a Custom Customer Field required with the check of a box similar to the radio button ability to make a Store Setting > Customer Fields Hidden, Required or Optional.
            Old post that needs to be circled back to. Thanks Bruce - PhosphorMedia for the miscellaneous fee work around. Is there a required custom field "workaround" that can be shared? I'm reaching on the behalf of a few others in need too. Thanks!
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: X | Facebook | Pinterest

            Comment

            • Bruce - PhosphorMedia
              Developer Partner











              • Mar 2006
              • 11256

              #7
              If its within a form post (say Complete Order), then its simply a matter of using the 'required' attribute in that field. For example, <input type='checkbox' name="whatever" required> and HTML5 will take care of it. if its not a checkbox, and some validation is required, HTML5 has some rudimentary methods tied to the 'TYPE" such as 'telephone, email, number' (see reference for complete listing. So,

              <input type="email" name="home_phone" required>

              Will basically check for "@" and "."
              Bruce Golub
              Phosphor Media - "Your Success is our Business"

              Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
              phosphormedia.com

              Comment

              Working...
              X