Is it possible, from within the filter, to access other form fields?
For example, in a form I want to add a hidden field called “UploadFolder” where I specify the upload folder for the file being uploaded. Then read that from within the filter and use it so that I can upload to different folders specified in different forms.




October 8, 2012 at 11:08 am
I think this is what you're looking for?
http://formidablepro.com/help-desk/organize-file-uploads-by-custom-field/
October 8, 2012 at 11:14 am
Awesome, thanks! So when I press SUBMIT, the form data is submitted to the same page, correct?
So I would add the filter code to that same page...?
October 8, 2012 at 11:16 am
Please see this page for brief instructions on using custom code.
http://formidablepro.com/knowledgebase/formidable-hooks/
October 8, 2012 at 11:30 am
Okay, thanks.
In the original link you gave, you recommended using the form ID number to get a form value. However, that number will be different for different posts. -> "You can try changing $post->post_name to $_POST['item_meta'][25] (replace 25 with the id of the field)"
Is it possible to get a value using the form data using the Field Key name instead?
October 8, 2012 at 11:50 am
The field key is also unique for each field, but you can use this to get the field id from the key.
global $frmdb;
$field_id = $frmdb->get_var($frmdb->fields, array('field_key' => 'key_here')); //replace key_here with your field key
$field_val = $_POST['item_meta'][$field_id];
Topic closed.