Custom Forms API

  1. bceglowski

    It would be excellent to see a native WordPress custom form API that supports input sanitising, security measures and display of data in the back-end... a bit like a mashup of some of the higher-level functionality of Solspace Freeform for ExpressionEngine, and CodeIgniter's suite of form controls and helpers.

    Syntactically it could appear something like this in a template:

    		'my_form',				// Form name
    		'http://formaction.do',	// Form action/return page if not AJAX
    		'recipient@email.com',	// Email recipient(s)
    		array(				// Required Fields - we could go a level deeper and set arrays of validation rules for each field, or call fields using PHP rather than HTML with validation rules specified inline
    	...inputs here...

    ...with a fairly simple admin panel that allows filtration of entries saved to the database by form name ("my_form" above) and some other parameters.

    Posted: 6 years ago #
  2. blackriver


    Does anybody know if any of the current WordPress form builder plugins have any API capabilities?

    Posted: 6 years ago #
  3. bceglowski

    I've not seen anything like that, thus far. The best I can do right now is to cripple Contact Form 7's JavaScript capabilities and build an HTML form using the plugin. IMO a good-old-forms-API is quite long overdue. I would write a plugin myself but haven't the time to commit to any new projects unfortunately.

    Posted: 5 years ago #
  4. Nashwan Doaqan

    There are a couple of plugins that can do something similar, this the one I am developing:


    Posted: 4 years ago #
  5. bceglowski

    Thanks Nashwan pal; had a look and it's promising. Keep up the good work!

    Posted: 4 years ago #
  6. Ben Doherty (Oomph, Inc)

    The Drupal forms API is very powerful and I've developed the following plugin to provide similar functionality:


    This is a very generic form generation and processing utility that provides single, composite, and array-type input elements, as well as image and attachment selection. You don't have to write a lick of markup to create and manage forms.

    The project is extremely young, but so far it has been extremely useful in rapidly developing various back-end forms. It is not nearly as feature-complete as the Drupal Forms API, but maybe one day it can be a big boy as well.

    Posted: 3 years ago #
  7. haarausfall


    Oh yes, Ben, that's exactly what I was searching for a long time. Thanks for sharing!

    I will just implement it to 2-3 of my projects and let you know how it works for me :-)


    Posted: 2 years ago #
  8. locally


    Many thanks for this Ben, great work.

    Posted: 2 years ago #
  9. treppen

    I like your plugin Ben Doherty, big ups and thank you.
    But for me, without deep scripting skills, I would prefer a more simple syntax like we use it in shortcodes. Is it possible to add that? Perfect would be to add it directly in the main code and insert a switch in the dashboard to enable the stuff. What do you think?

    Posted: 2 years ago #
  10. le mie nozze


    But...this is plugin territory?
    It seem a bit like a mashup.

    Posted: 1 year ago #

RSS feed for this topic


You must log in to post.

  • Rating

    44 Votes
  • Status

    This is plugin territory