Hi there, first of all I must say I’m extremely impressed with how flexible and powerful FP is!
I noticed that the ‘website’ field checks whether the user entered http:// in front of the url and returns if they didn’t. Modern browsers hide http:// from the address bar, so this is very user unfriendly if you ask them to copy the url from their browser.
Is there a way I can change this behavior and would you consider changing this in an update for everyone?




October 29, 2012 at 10:41 am
We've actually already made this change for the next release. Here's the change we made in formidable/pro/classes/models/FrmProEntryMeta.php. Go down to line 175 and add the text in red.
if($field->type == 'website' or $field->type == 'url' or $field->type == 'image'){ if(trim($value) == 'http://'){ $_POST['item_meta'][$field->id] = $value = ''; }else{ $value = esc_url_raw( $value ); $_POST['item_meta'][$field->id] = $value = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $value) ? $value : 'http://'. $value; } } //Don't validate the format if field is blank if ($value == '' or is_array($value)) return $errors;October 29, 2012 at 2:35 pm
Thanks, it works now. Beautiful!
Topic closed.