copied a form (duplicated it), now on submit, all fields required?

By: Larry Kolinek | Asked: 11/22/2022
ForumsCategory: General questionscopied a form (duplicated it), now on submit, all fields required?
Larry Kolinek asked 2 years ago

Hi,
i"ve never seen this and can't really explain it? I used the "duplicate form" link in FF to make a copy of a form. Upon testing the form, every field is required, BUT obviously, fields are NOT set as required. I even created one field as new, just to check it.... and yes, EVEN that field is being required even though its not?   what went wrong? anyone seen this behavior before?   thanks  

1 Answers
Rob LeVineRob LeVine answered 2 years ago
The only thing I can think of is that you have an instance of frm_validate_entry or frm_validate_field_entry that is always returning an error. When you say "every field is required" do you have that they display with the asterisk or that they turn red when you click the submit button or both?
Larry Kolinek replied 2 years ago

both...

a couple fields have the asterisk, but on a blank form, I hit submit... everything is red ???

how to look, check for "...instance of frm_validate_entry or frm_validate_field_entry returning error" ?

thanks for helping

Rob LeVineRob LeVine replied 2 years ago

Look in either your code snippets or your functions.php file in your theme, however, it's not like those functions would just exist, some developer would've had to put them there and if you're the only developer, then you either did it after drinking a case of Budweiser or...

Victor Font replied 2 years ago

I just duplicated a form in my development environment without issue. It's a vanilla test form I use for exploring issues that come up in these forums. This dev environment is built with the latest versions of all resources pertinent to web development. I'm getting no errors.

Because my result assures me it's not an undiscovered bug, there are 3 possible paths to explore:

1. Rob may be on the right track to suspect some code that is somehow related to the progenitor form that's executing in the copied form.
2. Something went wacky with the form copy process at a form level. You've already proven it's not a field level issue.
3. Dev Environment

To explore 2, I would use PHPMyAdmin to look at the data in the frm_forms table. This is where form definitions live. You would need to run a SQL SELECT statement to choose both the progenitor and copied form so you can compare the values of the two rows and eyeball any differences. Now comes the tricky part. The actual form options that need to be compared for most likely culprit are found in the options field. The options field stores all form configuration values as a serialized array. You need to copy these values into a text editor and see how different they actually are and if changing any on the settings in the copied form to match the parent form makes a difference when you run the form.

There's a lot of troubleshooting that needs to take place. However, if the two forms are close to identical in the database and when you compare their options, you can pretty much move Formidable to the bottom of the list of prime suspects. Now it's time to look at the environment. The environment can be anything including plugin conflicts. Make sure everything is up to date and that you backup your site before messing with the environment.

Also, one last thought...have you cleared all possible caches?

Larry Kolinek replied 2 years ago

uhmmmmm, so there was some issue???? on the "customize HTML" settings in the above fields, that caused a cascade effect somehow?

not sure, but I put things back to the way they originally were and eventually the form is working now.
I just need to add my customizations, etc. back in.

I'm assuming I just did something the form didnt' like, but it wasn't obvious.

thanks Rob

Rob LeVineRob LeVine replied 2 years ago

Dammit. I was just going to suggest looking there. I was in the shower and I'm like, "Wait, if the fields are showing up like that, it must be jquery stuff in the before or after fields"

Oh well, you win 🙂

Larry Kolinek replied 2 years ago

Hi Victor 🙂 long time

So I have seen some oddities due to cache, especially when building/testing...
I dont' remember seeing any caching issues before? [[ before being prior to say, 6 months? ]]

but assuming as FF has added functionality and evolving as a platform, that is expected?

Larry Kolinek replied 2 years ago

last thing.. I'm going to hi-jack my topic, as both of you are on here 🙂

==> I've very excited to try FF and the woocomerce features, but just wanted to know if it really works?
Have you tried creating new WC pages/product pages with FF?

thanks!

Victor Font replied 2 years ago

"WC pages/product pages with FF" - no not really. The only requirement I had for FF was when the client asked for special inputs on the My Account page.

Larry Kolinek replied 2 years ago

thanks... so when you did that, the FF integration was seamless? no problems?

Victor Font replied 2 years ago

It's no problem if you know WooCommerce. You have to define new rewrite endpoints using add_rewrite_endpoint() in the init action. The new endpoint loads your page template using get_template_part(). The template is a PHP file that includes the HTML and form shortcode you want displayed on the page.

Victor Font replied 2 years ago

Also, if security is required, you have to define the menus you want for the roles accessing the page using the woocommerce_account_menu_items filter.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right