I am running ver 1.04.07 of formidable pro and found that the unique field checking is not working correctly. It has several problems.
One is that if you have several different fields that must be filled out, but you don't fill some of them out and you also make two fields identical that must be unique, then it only warns you about the blank fields. Upon fixing the blank fields it then allows you to submit the form even though the “need to be unique” fields were never fixed (and it never warned you).
The other issue is that sometimes it correctly catches one field as needing to be unique (if you don't leave blank fields) but missed another. Other times it told me I had to make one unique even though it was unique.
I can link you to the form if need be. This was a pre ver 1.04.07 form and I have not tested it with a new form but I may do that. Thanks for looking into this as this is one feature I really need.
-Darrin




March 18, 2011 at 1:20 pm
I haven't seen this behavior anywhere else and am unable to replicate it. Looks like I'll need to check your form out and maybe get admin access if I need to see the backend settings. Thanks!
March 18, 2011 at 2:21 pm
https://www.studio1930.com/infotest/wedding-order-form/
Album image number 1, 2 and 3 are marked for unique (for now). Most other fields are marked required. Leaving some of them blank and putting the same number in fields 1, 2 and 3 will result in the unique fields not being checked for uniqueness ever. If you fill in all fields but make 1, 2 and 3 the same number then it will check them for uniqueness.
This is a test site so feel free to test this form as many times as you need.
On a side note, I also noticed that when you cause an error (leave field blank or something not unique) then it properly marks them red and tells you about it, but it also loads the favicon with http and not https which then breaks the page (IE will warn the users and mark the page not secure). The favicon does not throw this security error when you use the page without making a mistake. Not sure why the favicon loads okay the first time but not when you are warned about missing form data.
-Darrin
March 18, 2011 at 2:42 pm
I think you may be misinterpreting the unique fields. This just prevents the same number from being submitted in the same field more than once. I got unique error message when I tried inserting 1, 2, and 3 into these fields meaning someone else already used those numbers. It worked when I tried 111, 222, and 333 although I didn't fill out the captcha so the entry wasn't saved. Am I understanding the problem correctly?
I'll take a look at the insecure captcha. That does seem weird.
March 19, 2011 at 1:53 am
oh, well crap. I thought unique fields was just for that post. In other words, that form has 50 image entry slots that the user fills out and we don't want them to be able to use the same number on two of the 50 fields (images for an album so you shouldn't want the same image in your album twice). Hmm, is there any way to make sure a field is unique for just that post compared to any other fields in the form that are marked for unique? I have seen this done on other form sites where you pay a monthly fee to use them.
Thanks for clearing that up for me.
Yeah, the error on the SSL warning for the favicon (not the recaptcha) might worry or confuse some users. Mozilla just give the red circle error but IE actually does a pop-up which is what I really worry about.
Thanks,
-Darrin
March 21, 2011 at 5:01 am
Of course it can be done! It'll just take a little custom code. Here's a customized version of the example from this page:
http://formidablepro.com/wordp.....ess-hooks/
add_filter('frm_validate_field_entry', 'my_custom_validation', 10, 3); function my_custom_validation($errors, $posted_field, $posted_value){ if(!empty($posted_value) and in_array($posted_field->id, array(110,111,112))){ //add any field ids to this array that should be unique global $my_posted_values; if(!$my_posted_values) $my_posted_values = array(); //check the $posted_value here if(in_array($posted_value, $my_posted_values)) //this checks to see if the value of this field has already been used $errors['field'. $posted_field->id] = 'Please enter a unique photo number'; $my_posted_values[$posted_field->id] = $posted_value; } return $errors; }March 22, 2011 at 12:09 am
Great! I'll give this a try. Do you see this becoming a check box option in the future to avoid the custom coding?
Thanks,
-D
March 22, 2011 at 11:58 pm
Thank you much for the help. It is now working and I think I understand the process a bit more as well!
:)
-Darrin
March 23, 2011 at 12:37 am
One more question. Is there some code I can add to tell it not to throw an error if the field is left blank? I have some fields where I want the user to enter a unique number if needed, but if they leave it blank that should be okay too. Right now it recognizes a blank field and errors on the subsequent blank fields thinking they are not unique.
Also, how do I change this line to include the field name in the error?
$errors['field'. $posted_field->id] = 'Please use a unique number.';
Thanks for the help.
-D
March 23, 2011 at 11:02 am
Yep, edited that code again. Added if(!empty($posted_value) right before the array of IDs.
March 24, 2011 at 7:50 am
Thanks. That looks to have fixed that issue but I just noticed that the submit button is not working on the new FireFox 4.0 and also there are some weird issue with hidden fields working differently the more times you click them in IE 8 (wrong fields hiding and then showing up such as the "album cover type" fields - this works okay in Firefox but not in IE8).
Also, IE 8 didn't catch all of the duplicate (non-unique) fields but it did catch some of them. I bet you hate these browser code changes.
Also https error still there after error is detected in IE8 but is now gone in Firefox 4 (which now has popup errors instead of red text at the top).
I can start a new thread if needed for the browser specific issues.
https://www.studio1930.com/infotest/wedding-order-form/
-Darrin
March 24, 2011 at 7:55 am
Are you interested in running the newly updated beta version?
http://formidablepro.com/relea.....05.0b1.zip
March 24, 2011 at 8:00 am
Sure I can give it a try. I manage my own servers so I can create as many test databases as I need. I'll install it tonight or tomorrow and let you know the results.
FYI: I did notice that the last upgrade broke most of the hidden fields until I deleted them and added them back to old forms but worked fine on new forms that were created after the upgrade. Must be some database issue that needed to be reset by deleting the object and recreating it.
Thanks,
-Darrin
March 24, 2011 at 9:19 am
Sounds great.
For the hidden fields, it's possible the migration code didn't get fired off when you updated. Sorry about that.
March 29, 2011 at 1:52 am
Good news. Version 1.05.ob1 is working for the new Firefox 4.0 so far. I am doing more testing, but so far all of the new code in the unique-field plugin is working with this version of Formidable pro as well as the submit button. Hidden fields also work correctly although I need to create a new form to verify (I used the old pre-existing forms). IE 8 is also working correctly.
Bad news is that I am still getting the SSL security warning when the page changes to show you the missing or incorrect info fields. This is not good as all of my forms are SSL secured. Firefox does mask this issue, but IE put a pop-up window in the user's face. :(
Thanks,
-Darrin
March 29, 2011 at 10:02 am
Darrin, I'm having trouble replicating the recaptcha issue and can't find one on your site to try out. Do you have one up I could look at?
March 31, 2011 at 3:51 am
It is not a recaptcha error. This is strictly an SSL error. Use the following form in IE (firefox breaks too but doesn't show you as easily) and don't fill out anything, just click submit. You will get the error about the page not being 100% secure. Upon checking the details (in IE click view/webpage privacy policy - then scroll and check for http items instead of https) you will see that the ".../plugins/formidable/pro/images/error_icons/update.png" file is being loaded with http instead of https which breaks the page. I don't know if this is a function of WordPress or Formidable but it used to work (however my live site running Formidable Pro 1.04.03 is also broken).
Let me know if this makes sense and thanks for looking into this.
Beta version of Formidable Pro:
https://www.studio1930.com/infotest/wedding-order-form/
-Darrin
March 31, 2011 at 4:25 am
Oh, I see now. This is in the css. Whether this uses an SSL link or not depends on what you use on your Formidable settings page. Maybe you could try going to your Formidable settings page and switching it to https, and then click update? Just so you know, every time you update your Formidable settings page, the CSS file gets replaced. Let me know if this will work for you.
March 31, 2011 at 5:28 am
maybe I am missing something. I see where to change the icon (several to choose from), but I don't see where to tell it https over http. Are we talking about the GUI page or editing code someplace?
Thanks,
-Darrin
UPDATE: Ah, I get it. Just change to https when loading the settings page but don't change any settings. Then hit update and it should update the CSS. That appeared to work I think. Maybe you can add a "use SSL" check box on that page to make it easier and so we don't forget and change a setting without being on the https page when making that change.
UPDATE 2: I thought it was working but the production site didn't get fixed. I'll do more testing on getting this working with this method but it doesn't appear to be easy.
-Darrin
March 31, 2011 at 5:49 am
So it looks like that method works for the new beta version but not the older 1.04.03. At least that is what I am seeing so far.
I have 1.04.03 in production and 1.05.0b1 in test.
-Darrin
March 31, 2011 at 1:30 pm
Another option is to delete the CSS file inside wp-uploads/formidable/css and change the permissions on that CSS folder so the file can't be written. That way it would be dynamic although it would take a little longer to load.
Still another option would be to change it in that CSS file to https. However, this would have to be done every time you update your settings.
It does sound like it would be good to add an ssl checkbox or something.
March 31, 2011 at 11:10 pm
Thanks Stephanie. I'll give those options a try. I don't change my settings all that often so I think I'll be okay once I get it set. Hope to see a checkbox in future versions. :)
By the way, Firefox 4 does not have this issue since it doesn't load the error icon. It only highlights the boxes red which is kind of a problem since it also does not display the error messages that we have programed. So the user sees red boxes but there is not a message to tell them why they are red (other than a single float message for the first box but not for all of the others).
-Darrin
April 2, 2011 at 1:35 am
Are you using a beta version? If so, the HTML5 required attribute has been removed. I'll see if there's anything I can do about the Firefox error messages.
April 5, 2011 at 1:58 am
Firefox 4.0 with Formidable Pro 1.05.0b1.
April 5, 2011 at 4:06 am
I'm not seeing this on your form. I'm seeing the built-in error messages. Is this still happening?
April 5, 2011 at 5:10 am
The Beta 1.05.0b1 appears to be showing the correct error warnings but the older Formidable 1.04.03 is not showing the correct warnings when using Firefox 4.
1.04.03:
https://www.studio1930.com/info/wedding-order-form/
1.05.0b1 (fyi: changing code on this form as we speak):
http://www.studio1930.com/info.....rder-form/
Topic closed.