CraigMcKee Posted June 9, 2019 Share Posted June 9, 2019 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! Quote Link to comment Share on other sites More sharing options...
requinix Posted June 9, 2019 Share Posted June 9, 2019 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. Quote Link to comment Share on other sites More sharing options...
maxxd Posted June 9, 2019 Share Posted June 9, 2019 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... Quote Link to comment Share on other sites More sharing options...
CraigMcKee Posted June 10, 2019 Author Share Posted June 10, 2019 Thank you - you were in the right place - I changed that array to range(1-60) and that's done the trick thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.