function uc_strip_form in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_store/uc_store.module \uc_strip_form()
Strips <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.admin.inc - Populates the product add/edit div on the order edit screen.
- uc_payment_method_cod in payment/
uc_payment_pack/ uc_payment_pack.module - Payment method callback for the "Cash on Delivery" payment method.
- uc_payment_method_credit in payment/
uc_credit/ uc_credit.module - Callback function for the Credit Card payment method.
- uc_payment_method_other in payment/
uc_payment_pack/ uc_payment_pack.module - Payment method callback for the generic payment method "Other".
File
- uc_store/
uc_store.module, line 1530 - 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;
}