With this release, I’m pleased to announce that Content Notify now has it’s own form builder. Let’s get into it.
The new Form Builder is ready and it is a welcome change over constructing your own form shortcodes which you previously had to do. This functionality took a while to build for a few reasons. One, I found there wasn’t one obvious route to take as the builder could have been made in a number of different ways. Two, form builders are incredibly hard – even the basic one that I’ve implemented as a starting point took a lot of work and testing to get it to work and work well.
All of the previous features of the Content Notify shortcode are available and what’s more, because building forms is now ‘visual’, it means it’ll hide fields that you don’t need to worry about, such as hiding the post type field when you’ve asked the form to cater to a subscriptions for a specific post ID. Very handy.
Developing the form builder also allowed for some nice quality of life improvements that have been long standing issues but ones that I’ve wanted to tackle at the right time. This was the perfect time to fix some of these, such as allowing two (or more) forms to co-exist on the same page, submitting the forms without reloading the page (using AJAX), and providing options for what you want to happen after the form has been submitted – you now have the option of using a custom message, redirecting to another page, or doing nothing.
The first two are fairly self explanatory but the last option (do nothing) may require a bit more context:
It really lets your imagination run when you have the flexibility of a plugin such as Content Notify, and is something I try hard to ensure that it’s not too prescriptive as to its use cases, but to give enough away that you can find a place for it in your site.
If you want to use the old shortcode to build forms though, you can still do this. You’ll just miss out on some of the nice new features mentioned above.
I’m very excited to get this feature out the door and into the hands of the growing number of Content Notify customers, and I’m looking forward to developing it further as the plugin continues to grow.
Edit Subscription Form Button
There’s nothing like a bit of dog-fooding when it comes to development and as I was working on the form builder, I found myself going backwards and forwards a lot between editing a form in the WP Admin and viewing it on the front-end. So, I added a button that appears if a single form is added to a page so you can click it and be taken directly to the form editor. Neat!
This is the first release to include any PHP developer functions. Prompted by some recent support tickets, I thought of two use cases where a PHP function that a developer could use to interact with the plugin would be helpful. There are two functions included in this release, and I have no doubt more will be added in the future as needs arise.
cn_get_user_subscriptions() retrieves all subscriptions for a given user ID or email address and
cn_subscription_single_check() checks to see if a user already has a subscription to a post/page/custom post type, when passing in their user ID/email address and a post ID.
There are some good examples of where these can be used in the Hooks & Filters support doc.
This was a big release and I’m taking some time now to develop this website a bit and think about exactly which feature I want to work on next. None of the next few releases are going to be small so I want to make sure I’m putting my energies where they make the most impact for the plugin.
Until next time!