Help Needed: PHP Function Only Creates Image Fields but Fails for Text and Textarea in Formidable Forms

By: Tobias Kaplan | Asked: 12/04/2023
ForumsCategory: Code HelpHelp Needed: PHP Function Only Creates Image Fields but Fails for Text and Textarea in Formidable Forms
Tobias Kaplan asked 8 months ago

Hello everyone, I've been working with Formidable Forms in WordPress to programmatically create form fields using PHP. I've written a function that is supposed to create different types of fields based on the input it receives. While the function successfully creates image fields, it fails to create fields for 'text' and 'textarea'.  

 

 

  Code: https://codefile.io/f/8zPOk4u4Z5        

 

When I run this function with the 'image' type, it works ok and creates the field (not all the attributes are perfect, though). However, when I attempt to create 'text' or 'textarea' fields, they do not appear in the form, or they are not functional as expected. Has anyone else encountered this issue or can spot something in my code that may be causing these specific field types to fail? Any insight or suggestions would be greatly appreciated!   Thanks!

1 Answers
Rob LeVineRob LeVine answered 8 months ago
I took your code and used it on my server and it creates the text field just fine. Have you turned on server-side debugging to see if any errors are logged?

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