Form has Expired: Using Input helper on Public form
hey im tryin to use this input helper in a public form associated on a pick field, the reason for this is im changing the pick field to a input field plus im adding 2 more fields of my choice against this form for me to process in a post-save helper, but i get a form expired everytime i try to save the form
please let me know what i should be doin, the code for the input helper is below
<input class="<?php echo $css_classes; ?>" id="<?php echo $css_id; ?>" type="text"></div><div class="clear"></div> <div class="leftside brand">Store Address <span class="red">*</span></div><div class="rightside brand"><textarea class="store_add" name="store_add" id="store_add" rows="5" cols="40"></textarea></div> <div class="leftside brand"><input class="add_offer_pb" id="add_offer_pb" name="add_offer_pb" value="1" type="hidden"></div>
6 Answers
Try this:
<input class="<?php echo $css_classes; ?>" id="<?php echo $css_id; ?>" type="text"></div><div class="clear"></div> <div class="leftside brand">Store Address <span class="red">*</span></div> <div class="rightside brand"><textarea class="form store_add code" name="store_add" id="store_add" rows="5" cols="40"></textarea></div> <div class="leftside brand"><input class="form add_offer_pb txt" id="add_offer_pb" name="add_offer_pb" value="1" type="hidden"></div>
Open ajax/api.php and comment out the code:
if (!pods_validate_key($params->token, $params->uri_hash, $params->datatype, $params->form_count)) {
// HACK, dont expire the forms motherfuckers
// die("<e>The form has expired.");
}
hey guys i tried both the method today, with the second method of commenting the error in the API file i get a SQL SELECT statement error, any ideas?
this is the public form at the moment
$Record = new Pod('offer');
//simplified
$fields = array('name', 'short', 'image', 'terms', 'camp_cat', 'city', 'camp_end' => array('input_helper' => ''), 'brand' => array('input_helper' => 'add_offer_brand_details'));
echo $Record->publicForm($fields, 'Add Offer!');
this is the input helper
<input class="<?php echo $css_classes; ?>" id="<?php echo $css_id; ?>" type="text"></div><div class="clear"></div> <div class="leftside brand">Store Address <span class="red">*</span></div> <div class="rightside brand"><textarea class="form store_add code" name="store_add" id="store_add" rows="5" cols="40"></textarea></div> <div class="leftside brand"><input class="form add_offer_pb txt" id="add_offer_pb" name="add_offer_pb" value="1" type="hidden"></div>
where in im modding the brand pick field to show up as a plain input field instead of a dropdown plus im tryin to append 2 more elements, one a textarea n input field to process for custom stuff
Try this:
<input class="<?php echo $css_classes; ?>" id="<?php echo $css_id; ?>" type="text"></div><div class="clear"></div> <div class="leftside brand_store">Store Address <span class="red">*</span></div> <div class="rightside brand_store"><textarea class="form code store_add" name="store_add" id="store_add" rows="5" cols="40"></textarea><input class="form txt add_offer_pb" id="add_offer_pb" name="add_offer_pb" value="1" type="hidden" /></div>
Also check this for more info on the error:
http://podscms.org/qna/questions/1659/increased-file-upload-size-in-php.ini-now-i-get-form-has-expired-error-upon-saving-pods-item


