function uc_strip_form in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_store/uc_store.module \uc_strip_form()
Strip <form> tags and form_token and form_id hidden fields from form HTML for use in an AJAX populated div. (Enables these values to be access via $_POST.)
4 calls to uc_strip_form()
- uc_order_edit_products in uc_order/
uc_order.module - Populate the product add/edit div on the order edit screen.
- uc_payment_method_cod in payment/
uc_payment_pack/ uc_payment_pack.module - Handle the Cash on Delivery payment method.
- uc_payment_method_credit in payment/
uc_credit/ uc_credit.module - uc_payment_method_other in payment/
uc_payment_pack/ uc_payment_pack.module - Handle the generic payment method "Other."
File
- uc_store/
uc_store.module, line 2401 - Contains global Ubercart functions and store administration functionality.
Code
function uc_strip_form($html) {
$html = preg_replace('`</?form.*>`', '', $html);
$html = preg_replace('`<input.*name="form_(token|id)".*>`', '', $html);
return $html;
}