CartThrob 9 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

Save Vault Checkbox

save_vault_checkbox outputs a ready-to-use checkbox input for forcing vault-save behavior during checkout.

This is an immediate-execution single tag.

See also:

Parameters

id

Optional HTML id for the generated checkbox.

id="save_vault"

checked

Boolean-style default checked state.

checked="yes"

Output

Outputs an <input type="checkbox"> with:

  • name="VLT"
  • encrypted value generated from save_vault_field_value
  • optional id
  • optional checked state

Behavior and Constraints

  1. If member is not logged in, this tag returns no output.
  2. Value is generated by save_vault_field_value (encrypted 'y').
  3. Checkbox name is fixed to VLT.

Examples

Inside a checkout form:

<label>
    {exp:cartthrob:save_vault_checkbox id="save_vault" checked="no"}
    Save this payment method for future purchases
</label>

Checked by default:

{exp:cartthrob:save_vault_checkbox id="save_vault" checked="yes"}