Jump to content
CraigMcKee

Newbie Question!

Recommended Posts

Hello, I'm sorry, I know nothing about php programming but need some help - I'm sure this will be a simple question! 

I have created a Formidable form on Wordpress (form is named BookingTest).  It has a drop down box on (called dropdown) that has a list of numbers that requires a unique value.  The plugin designers have shared some code that is supposed to remove used values from the drop down box but it's not working - I don't know if I've put it in the right place or if I need to edit it or anything like that.  

This is there documentation: https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/?fbclid=IwAR1Zj1jWo6iqdR4Cjq8MGpTLRW01XToPR7vp_2oN4XEmQ81SLAW-sbtbYKU#kb-remove-used-options

I have pasted this code in it's entirety to a Code Snippets plugin but I still get all the values appear.  

Do I need to amend it to refer to my form explicitly?  How is this filter called?  Do I need to add an action?!

Really confused :(

Thank you! 

Share this post


Link to post
Share on other sites

Really hard to know without having access to all the code...

Have you see their forums, or I guess joined their Slack group? The problem with questions about topics like this Formidable stuff is that you can't go around showing anyone (like us) what code you're working with because of copyrights, but we kinda need to see that code in order to know what to do. So their own support channels are the best place to start.

Share this post


Link to post
Share on other sites

Put the code from the example in your child theme's functions.php file. I assume you're using a child theme - if not, create one and then do it. You don't want to modify any plugin or pre-built theme files directly as those changes will be overwritten every time the plugin or theme updates.

Now, that having been said, you can't just copy and paste the example code - you'll have to modify it to fit your purposes. For instance, the example code checks for any fields with an ID of 100, 101, or 102 before running the rest of the logic. The likelihood that the fields you're looking to compare against are ID 100, 101, or 102 is slim...

Share this post


Link to post
Share on other sites

Thank you - you were in the right place - I changed that array to range(1-60) and that's done the trick :D thank you. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.