Skip to content

Forms ​

Last updated View as Markdown
  • New form types: cart, coupon, coupon_remove, product_review and express_checkout. See form.
  • The tag takes an object and any HTML attribute: {% form 'product', product, id: 'buy', class: 'buy' %}. The product form outputs the variant input for you.
  • return_to sets where to go after a successful post: a store path, back or checkout.
  • Inside a form, form describes the last post of that form: posted_successfully, errors and the submitted values, for example form.email. The default_errors filter lists the errors.
  • The cart form updates quantities, saves the note, clears the cart and goes to the checkout. cart.note returns the note.

Search ​

  • The search template has a search object with terms, performed, results and results_count, and {% paginate search.results by 24 %} paginates the results. See search.

Last updated: