1. Startseite
  2. Wissensdatenbank
  3. SmartTags™.
  4. Formular SmartTags™
  5. Formularfeld SmartTag™ (MM_Form_Field) - Checkout-Formular

Formularfeld SmartTag™ (MM_Form_Field) - Checkout-Formular

Dieses Tag wird in Verbindung mit dem Tag MM_Form verwendet. Es gibt Formularfelder aus, mit denen der Benutzer interagieren kann, um Daten einzugeben.

Attribute

Die verfügbaren Feldtypen und anderen Attribute variieren je nach übergeordnetem Formulartyp. Dieser Artikel befasst sich mit den Attributen und Anwendungsbeispielen für den Formulartyp "Kasse".

Zur Kasse

Typ (optional) – Indicates the type of form field to create. Acceptable values are input, hidden, custom or custom-hidden. The default value is ‘input’.

  • Eingabe – Form fields of type ‘input’ output a standard HTML form element that the user can interact with to enter in information. Based on the value ‘name’ attribute MemberMouse will render the appropriate HTML form element.

    For example, a dropdown will be rendered for selecting a Country and an input field will be rendered for entering in their first name. The ‘name’ attribute is required for input form fields.

  • versteckt – Form fields of type ‘hidden’ output a hidden HTML element which indicates to MemberMouse that the ‘name’ associated with this form field can be ignored when validating the form.

    For example, when purchasing a product, billing address is required by default so MemberMouse won’t allow the user to proceed until a billing address has been provided. By using a form field of type hidden for billing address, you’re instructing MemberMouse to allow the form to be submitted without providing a billing address. This is useful when you want to provide a minimal checkout form in cases where you don’t require certain information. The ‘name’ attribute is required for hidden form fields. The ‘value’ attribute is optional.

  • benutzerdefinierte – Form fields of type ‘custom’ output an HTML form element that the user can interact with to enter in information associated with custom fields you’ve configured in MemberMouse. The ‘id’ attribute is required for custom form fields. The ‘isRequired’ attribute is optional.

  • benutzerdefiniert-versteckt – Form fields of type ‘custom-hidden’ output a hidden HTML form element that stores data associated with custom fields you’ve configured in MemberMouse. The ‘id’ attribute is required for custom form fields. The ‘isRequired’ attribute is optional.

    Hidden custom fields are perfect for storing information related to the order that the user doesn’t enter.

    For example, you could track the ad name they came from, which keyword they used to find your product, etc. All you need to do is pass a querystring parameter to the page in the following format: ‘cf_{ID}’ where ‘{ID}’ is replaced by the ID of the custom field.

    Here’s an example: http://mysite.com/checkout?cf_1=banner-1&cf_2=marketing. In this example, we’re passing ‘banner-1’ as the value for the custom field with ID 1 and ‘marketing’ as the value for the custom field with ID 2.

  • Name (Bedingt durch den Feldtyp) – This field is required for ‘input’ and ‘hidden’ field types. It indicates what data is being collected in the field.

    Nachstehend finden Sie eine Tabelle mit den zulässigen Werten.

    If a field is optional this means you don’t have to include it in the form. If it’s required, you have to include it in the form, but in a number of cases you can hide required fields from being seen by setting the type to hidden.

    Certain names are valid for both ‘input’ and ‘hidden’ field types while others are valid just for ‘input’ fields.
WertBeschreibungOptionalGültige Feldtypen
VornameCollects the user’s first nameNeinEingabeversteckt
NachnameCollects the user’s last nameNeinEingabeversteckt
E-MailCollects the user’s email addressNeinEingabe
E-Mail-BestätigungZwingt den Benutzer, seine E-Mail-Adresse zu bestätigenJaEingabe
NutzernameCollects the user’s usernameJaEingabe
TelefonCollects the user’s phone numberNeinEingabeversteckt
PasswortCollects the user’s passwordNeinEingabeversteckt
captchaZwingt den Benutzer zum Ausfüllen eines Captcha-Feldes zur ValidierungJaEingabe
billingAddressCollects the user’s billing addressNeinEingabeversteckt
billingCityCollects the user’s billing cityNeinEingabeversteckt
billingStateCollects the user’s billing stateNeinEingabeversteckt
billingZipCodeCollects the user’s billing zip codeNeinEingabeversteckt
billingCountryCollects the user’s billing countryNeinEingabeversteckt
shippingAddressCollects the user’s shipping addressNeinEingabeversteckt
VersandStadtCollects the user’s shipping cityNeinEingabeversteckt
shippingStateCollects the user’s shipping stateNeinEingabeversteckt
shippingZipCodeCollects the user’s shipping zip codeNeinEingabeversteckt
shippingCountryCollects the user’s shipping countryNeinEingabeversteckt
shippingMethodErfasst die vom Benutzer gewünschte VersandartNeinEingabeversteckt
shippingSameAsBillingOutputs a checkbox the user can click to indicate whether or not they want to provide a shipping address that’s different from their billing address.NeinEingabe
ccNummerCollects the user’s credit card numberNeinEingabe
ccExpirationDateCollects the expiration date associated with the user’s credit card numberNeinEingabe
ccSecurityCodeCollects the security code associated with the user’s credit card numberNeinEingabe
couponCodeErfasst den Gutscheincode, den der Benutzer auf die Bestellung anwenden möchteJaEingabe
GeschenkGibt ein Kontrollkästchen aus, das der Benutzer anklicken kann, um anzugeben, ob das gekaufte Produkt ein Geschenk ist.JaEingabe

  • Klasse (Bedingt durch den Feldtyp) – This field is optional for ‘input’ and ‘custom’ fields. It indicates the CSS class that should be used for the field.

  • Wert (Bedingt durch den Feldtyp) – This field is optional for ‘hidden’ fields. It specifies the default data to set for the field specified in the ‘name’ attribute.

  • id (Bedingt durch den Feldtyp) – This field is required for ‘custom’ and ‘custom-hidden’ fields. It specifies the ID of the custom field to collect data for.

  • isRequired (Bedingt durch den Feldtyp) – This field is optional for ‘custom’ and ‘custom-hidden’ fields. It indicates whether the custom field should be required. Acceptable values are ‘true’ and ‘false’. The default value is ‘false’. This attribute can also be use on ‘input’ fields that can be hidden. This includes  firstName,  lastName,  phone,  password,  billingAddress, billingCity, billingState, billingZipCode, billingCountry, shippingAddress, shippingCity, shippingState,shippingZipCode.

  • Standard (bedingt durch den Feldnamen) – This field is optional when the ‘name’ is set to ‘shippingMethod’. Here you can specify the key of the shipping method to use as the default. Read this article to lernen, wie man den Schlüssel der Versandart nachschlägt.

  • customAttributes (Bedingt durch den Feldtyp) – This field is optional for ‘input’ fields. This attribute can be used to add additional HTML attributes to the HTML input field generated by MemberMouse. Whatever is set in this attribute will be added to the HTML verbatim. For example, if you do the following:
[MM_Form_Field type='input' name='firstName' customAttributes='placeholder="First Name"']

Es wird folgendes HTML generiert:

<input type="text" id="mm_field_first_name" name="mm_field_first_name" class="mm-textField" placeholder="First Name">
Beispiel für die vollständige Verwendung
[MM_Form type='checkout']

Eingabefelder:
Vorname: [MM_Form_Field type='input' name='firstName']
Nachname: [MM_Form_Field type='input' name='lastName']

Ausgeblendete Felder:
[MM_Form_Field type='hidden' name='billingAddress']
[MM_Form_Field type='hidden' name='billingCity']
[MM_Form_Field type='hidden' name='billingState' value='TX']
[MM_Form_Field type='hidden' name='billingCountry' value='US']

Benutzerdefinierte Felder:
Geburtstag: [MM_Form_Field type='custom' id='1' isRequired='true']
Höhe: [MM_Form_Field type='custom' id='3' isRequired='false']

Verstecktes benutzerdefiniertes Feld:
[MM_Form_Field type='custom-hidden' id='5']

...andere Formular SmartTags...
[/MM_Form]
War dieser Artikel hilfreich?

Verwandte Artikel

Sie können die gesuchte Antwort nicht finden?

Wenden Sie sich an unser Customer Success Team
Kontaktieren Sie uns!