Is it possible to have the saved value of a field be conditional upon the entry creation date? For example, if a user fills the form out on or before 11/1/2012, the value 40 would be stored; but if the user fills the same form out on 11/2, the saved value would be 50?




October 18, 2012 at 10:25 am
I think this is what you're looking for.
http://formidablepro.com/help-desk/conditional-calculation/
October 18, 2012 at 1:41 pm
It's close, yes. However, I have a dropdown involved and the answers generate different costs.
Booth A: Early Reg = $1, Late Reg = $2
Booth B: Early Reg = $1, Late Reg = $2
Booth C: Early Reg = $2, Late Reg = $3
So if the default value equals 1, the new value would be 2. But if the default value equals 2, the new value would be 3.
Can this be edited to make the above happen?
add_filter('frm_get_default_value', 'my_custom_default_value', 10, 2);
function my_custom_default_value($new_value, $field){
if($field->id == 243 and (strtotime('2012-11-16 23:59:59') > time())){ //change 241 to the ID of the field
$new_value = '1';
October 18, 2012 at 4:19 pm
I'm not sure what you're saying the values would be. I'd suggest setting up your form as you'd like it to be for early registration. Once you have that working the way you'd like, you can add custom code to add values.
http://formidablepro.com/knowledgebase/frm_setup_new_fields_vars/
October 18, 2012 at 4:22 pm
Got it. Thanks!
Topic closed.