I have two problems with a form:
(1) I am creating a post with my
form and I have a drop-down for the post category, which I think is the way
that categories are supposed to be presented; however, regardless of my
selection, the post is assigned to WordPress' default category. Any
ideas why this occurs or how I can fix it? (I've tried deleting and
recreating the field, but to no avail.)
(2) I have followed
your real-estate photo example and read various forum posts about using
img scr with the short code. My images do get uploaded, but I cannot get
them images to appear in the custom display. Any ideas of what could be
going wrong? For example, do photos have to be uploaded into year and
month folders, or can I use “/wp-content/uploads/”?
I know that it is related to the short code because I am able to embed arbitrary images into the custom display, i.e., I can show the uploaded image by manually providing a direct link to the file, e.g., /wp-content/uploads/filename.jpg.
Thanks, in advance, for your help.




December 6, 2010 at 8:14 am
The category field is intended to be a check box field, and hasn't been tested thouroughly in a drop-down field. Will it work to switch it?
I didn't see any issues at a glance with the form template you sent over. What is the code you are using in your custom display?
December 6, 2010 at 9:19 am
Thanks. It works as a checkbox.
Is there a way to format the checkbox so that they categories are in some sort of organized grid? I have over 30 categories and the default view with checkboxes is rather messy.
Later, I'll send the relevant code for the custom display.
December 6, 2010 at 2:25 pm
I got the photos to appear in the custom display by creating custom field names for each one. I don't recall seeiing that as a requirement, but maybe I missed it.
What seems strange is that I didn't have to use the custom field name, e.g., "photo1," in the custom display, but simply creating a custom field was sufficient. Anyway, now it works.
I still have two questions, (1) do you have any advice to format checkboxes, i.e., to put them in nice columns? If so, that would be great.
Also, (2) is there a way to use the response to one question as a default value or as a choice in another question? If there is a way, do I need to create a custom field? Simply putting a field number like [12] as a choice or default value doesn't seem to work.
December 7, 2010 at 11:35 am
Are you using the beta version? If not, the need to set up a custom field is a bug that has been fixed in the beta version (if I understand the issue correctly).
1) Do the check boxes have to be in columns, or would it work to stick a border around them in a scrollable box? Sorry about the issue with the drop-down field. I'll look into this before releasing the next update.
2) How exactly are your forms integrating? Is this a multi-paged form? Is there one form that submits to the page with a second form? If the response is still available as a POST variable or is in the URL, this is built-in. Otherwise, you will need to add some PHP to fetch whatever entry, and the field you would like to use. I can't really answer this question without more details though. What can you tell me?
December 17, 2010 at 5:29 am
Sorry for the long delay in the replying.
My categories are sports that high school kids play. I solved the problem by using the check boxes to allow them to select multiple sports. I then created a "main sport" dropdown which is used to show conditional performance measures for individual sports.
Q1: from the readme.txt file of the latest release, I see now that categories work as drop-downs, and that is a great feature. Is there a way to easily exclude categories from the drop-down?
Regarding my categories as check boxes, currently, there are listed in one long category because that looks better than showing them across rows (with no order to the rows), but it would be nice to show them in some sort of tabular format.
Regarding your (2) above, sorry if I was unclear. I only have one form with one page but would like to use an input from the top of the form as a default value and/or as one possible multiple-choice value below. Is that possible? If it is built-in, how do you go about implementing it? I was unsuccessful using the field number, [12].
By the way, it is great to see you quickly implement changes and improvements in new versions. Thanks. It is a formidable application. (Calling it a plug-in doesn't do it justice.)
December 17, 2010 at 11:11 am
There's not a super easy way to exclude categories, but it can be done with something like this:
add_filter('frm_setup_new_fields_vars', 'set_custom_cats', 20, 2); add_filter('frm_setup_edit_fields_vars', 'set_custom_cats', 20, 2); //the numbers above don't need to be changed. The 20 is the order this filter should be fired. Mine fires at 10, so your must be after that in order to override my categories. The 2 is the number of parameters passed. function set_custom_cats($values, $field){ if($field->id == 25){ //change 25 to the category field ID of your first form $categories = get_categories(array('type' => 'post', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false)); //change this line to get the categories you would like for this field $options = array(); foreach($categories as $cat) //this set the categories up in the format needed for Formidable $options[$cat->term_id] = $cat->name; $values['options'] = $options; }else if($field->id ==40){ //change 40 to the category field ID of your 2nd form $categories = get_categories(array('type' => 'post', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false)); //change this line to get the categories you would like for this field $options = array(); foreach($categories as $cat) $options[$cat->term_id] = $cat->name; $values['options'] = $options; } return $values; }2) It sounds like you'll need to add some javascript to your customizable HTML. Hopefully I'm understanding correctly now. So when a value is entered in a field above, it should automatically be added into a lower field as well? If so, try this:
jQuery(document).ready(function($){ $('#field_price-1').change(function(){ $("#field_total").val($("#field_price-1").val();); });})
Replace 'price-1' with the field key of the first field, and 'total' with the field key of the second.
Topic closed.