WordPress.org

Ideas

Custom Forms API

  1. bceglowski
    Member

    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:

    <?php
    	open_the_form(
    		'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
    			'name',
    			'email',
    			'telephone'
    		)
    	);
    ?>
    	...inputs here...
    </form>

    ...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: 3 years ago #
  2. blackriver
    Member

    12345

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

    Posted: 2 years ago #
  3. bceglowski
    Member

    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: 2 years ago #
  4. There are a couple of plugins that can do something similar, this the one I am developing:

    http://wordpress.org/plugins/momtaz-nmwdhj/

    Posted: 1 year ago #
  5. bceglowski
    Member

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

    Posted: 1 year ago #
  6. Ben Doherty (Oomph, Inc)
    Member

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

    https://github.com/oomphinc/WP-Forms-API

    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: 6 months ago #
  7. bih
    Member

    12345

    Ben this is great. Thanks for sharing and i hope it will be good. I have to try it on some of my new projects :)

    Posted: 2 months ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    17 Votes
  • Status

    This idea is under consideration