Announcement

Collapse
No announcement yet.

Custom Field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Field

    I want to add extra fields to my customer registration form by using the custom field. One of the fields will be a drop-down list. What 'type' should I use to display the drop-down for input?

    #2
    Hello

    Do you want to add an addtional dropdown selection to the Customer Create(ACAD)page?
    Can you tell me what information you are attempting to add?

    http://docs.miva.com/template-langua...ustomer-fields
    Happie Mendenhall
    Support Technician
    Miva, Inc.

    Comment


      #3
      If you are using a Customer or Order field, you can only have a "default" field. This is fine, because you just need a container. The trick is to setup the form where you are asking the question like so:

      Favorite Color:
      <select name="favcolor">
      <option value="blue">Blue</option>
      <option value="red">Red</option>
      <option value="green">green</option>
      </select>

      When you process the form, the value of g.favcolor will be one of the options above.
      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


        #4
        Thank you so much for replying.

        Yes, I'm trying to create some custom fields on the ACAD page. You see, I sell wholesale to the trade only. I want a registration page that allows additional information such as TaxID and Business Type. For TaxID, it's just a text field, but for Business Type, I want a drop-down menu that has values such as Retail Store, Designer, etc. I've already created 2 custom fields with type=customer. Can you show me the codes I'd need to write to display the fields on the ACAD, and to capture the input? Really appreciate the help.

        Thank you.

        Comment


          #5
          Just an FYI alevating - you are still in your moderation period. Apologizes for not getting your reply approved sooner. You should only have 1 more post to go and you'll be good to go.

          Leslie
          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


            #6
            Originally posted by alevating View Post
            Thank you so much for replying.

            Yes, I'm trying to create some custom fields on the ACAD page. You see, I sell wholesale to the trade only. I want a registration page that allows additional information such as TaxID and Business Type. For TaxID, it's just a text field, but for Business Type, I want a drop-down menu that has values such as Retail Store, Designer, etc. I've already created 2 custom fields with type=customer. Can you show me the codes I'd need to write to display the fields on the ACAD, and to capture the input? Really appreciate the help.

            Thank you.
            Create a Custom Customer Field called "BusinessType".

            Then create the select input like:

            <select name="BusinessType">
            <option value="PetGrooming">Pet Grooming</option>
            <option value="UnicornWrestling">Unicorn Wresting</option>
            <option value="SnakeCharming">Snake Charming</option>
            </select>

            When you write back the value of g.BusinessType into the custom field, its contents will be the value of the OPTION selected.

            <mvt:item name="customfields" param="Write_Customer_ID( l.settings:customer:cust_id, 'BusinessType, g.BusinessType )" />
            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


              #7
              I've written these codes to the ACAD and ACED pages (within Customer Fields):

              <div class="&mvte:global:TaxID_Row;">
              <mvt:item name="customfields" param="Write_Customer_ID( l.settings:customer:id, 'TaxID', g.Customer_TaxID )" />
              <label class="required" for="Customer_TaxID">Tax ID:</label>
              <input type="text" name="TaxID" id="TaxID" value="&mvte:global:TaxID;" class="textfield" />
              </div>
              <div class="&mvte:global:BusinessType_Row;">
              <mvt:item name="customfields" param="Write_Customer_ID( l.settings:customer:id, 'BusinessType', g.Customer_BusinessType )" />
              <label class="required" for="Customer_BusinessType">Business Type:</label>
              <select name="Customer_BusinessType">
              <option value="Wholesaler">Wholesaler</option>
              <option value="Designer">Designer</option>
              <option value="Retailer">Retailer</option>
              </select>
              </div>

              However, the custom field values are not captured and not stored in the fields when I checked the customer page - the custom fields are still empty. What have I done wrong or not done to capture this information?

              Thanks for any help I can get.

              Comment


                #8
                Make sure the Customer Fields names are correct.
                Make sure your inputs are inside the <form> and </form> tags

                and

                g.Customer_TaxID s/b g.TaxID in

                in
                <mvt:item name="customfields" param="Write_Customer_ID( l.settings:customer:id, 'TaxID', g.Customer_TaxID )" />
                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


                  #9
                  Thank you so much Bruce. Really appreciate your help. I'm a bit lost here, however.

                  I don't quite understand what you meant by these lines:


                  g.Customer_TaxID s/b g.TaxID in

                  in
                  <mvt:item name="customfields" param="Write_Customer_ID( l.settings:customer:id, 'TaxID', g.Customer_TaxID )" />
                  Let me give you what I have so far:

                  Under Utility Settings, I've created a customer custom field name called TaxID with code TAXID. And on ACAD and ACED pages, I've included these lines within <form>:
                  <div class="&mvte:global:TaxID_Row;">
                  <mvt:item name="customfields" param="Write_Customer_ID( l.settings:customer:id, 'TaxID', g.Customer_TaxID )" />
                  <label class="required" for="Customer_TaxID">Tax ID:</label>
                  <input type="text" name="TaxID" id="TaxID" value="&mvte:global:TaxID;" class="textfield" />
                  </div>

                  I know I have done something wrong with the Write function with wrong parameters. Can you tell me the correct way? Also, does it make a difference for the sequence of the statements to have the write function come before or after the input statement?

                  Thank you so much for taking time to help me on this.

                  Comment


                    #10
                    In this function call

                    <mvt:item name="customfields" param="Write_Customer_ID( l.settings:customer:id, 'TaxID', g.Customer_TaxID )" />

                    l.settings:custom:id | identifies the current customer.
                    'TaxID' | is the CODE of the customer custom field.
                    g.Customer_TaxID | is the web page variable (also known as a CGI name/value pair) created by the form.

                    So, in your case, your form has this input:

                    input type="text" name="TaxID" id="TaxID" value="&mvte:global:TaxID;" class="textfield" />

                    Whose "name" is TaxID, so

                    g.Customer_TaxID needs to be g.TaxID (or the form input needs to change to g.Customer_TaxID)


                    As for the Write Statements, You need them on the ACED Screen as that's the "Target" of the form where the variables will be available to process them. They are not needed on the ACAD screen.
                    The ACED screen should ALSO have the "READ" functions so that those fields are populated with the stored values when customers return to the page. I usually place both read and write functions like these at the top most part of the page.(Like just inside or before the <head></head> tags.
                    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