One of our clients required a contact form with repeatable form fields that allows their staff to submit time sheets, mileage sheets and holiday requests. We ended up building a custom jQuery plugin to handle the dynamic form fields. Creating client work with open source software and developing open source software at the same time makes everyone happy.
WordPress Contact Forms
html Contact forms have been a staple of the web since forever. They allow your users to contact you, enquire about services, book appointments, send information or register their interest. Receiving information from your clients and potential customers is key to everybody’s business. Therefore finding a good WordPress plugin to handle your web forms is paramount to a successful website web project. As always there are a deluge of plugins for WordPress that do a good job of creating forms, sending emails and collecting data.
After using WordPress for so long we have of course got a firm favorite when it comes to website contact form plugins. We nearly always use Contact Form 7 to create our clients’ contact forms. We also additionally install the Flamingo plugin which stores any submitted forms in the WordPress database for easy retrieval.
Contact Form 7 usually meets all of our requirements. If we do find it lacking there are many addons that can extend the already extensive functionality even further. Dynamically repeatable form fields is something that Contact Form 7 doesn’t do out of the box which isn’t really surprising. Other great WordPress contact form plugins such and Gravity forms and Ninja Forms also lack a repeatable form field groups feature.
Plugins and Addons vs Custom Development
Going down the plugin hunting route can sometime end in a time consuming disaster. Spending time researching what plugin is going to work, only to find that it doesn’t quite do what you expected is not good. If the developer of the plugin in is nowhere to be found or the plugin has not been in active development for months then this could be a lot of time and effort down the drain.
On the surface this problem seem fairly straight forward. We decided to create a simple jQuery script to add the functionality that we needed. Once the development was under way we quickly realised that this might not be as simple as it seemed. Every input field needs a unique name so the script needed to be aware of how many fields it had added. jQuery is good at cloning element but making multiple clones with unique name is not totally straight forward. Of course this wouldn’t be as simple as we first thought.
Repeatable Form Fields Plugin
After a bit more time and work the simple jQuery script had evolve into an equally small jQuery plugin. Form Field Repeater is pretty specific and has limited functionality. What it does do, it does pretty well and it was fun to build and is fun use. I’ve open soured it on GitHub and set up a simple demo site to show off its awesome power. Hopefully this might be useful for some one as it is. If I can find the time I might and a feature or two to make it a bit more versatile. If you want to add your own features, go ahead and fork it on GitHub.
Talbot Green is full of many wonders but did you know we have our very own Kitchen and Bedroom studio? Ready and waiting for you, the house do’er upper to go along and plan your dream kitchen or bedroom.
Forget the high street chains with all their sales and over selling, go somewhere where you deal with people who are just like you. They are not there to sell you something you don’t want to make their targets or cut the price of a product because it isn’t selling.
When you go to the Kitchen and Bedroom studio you will meet Rob or Geraldine, a husband and wife team that will have no doubt had one of their own kitchens in their own Homes and can personally vouch for what they are like to use on a daily basis.
Budgets, styles and weird shaped rooms
The Kitchen and bedroom studio have eight go to manufacturers they use for their kitchens. They range in price from budget to bespoke and come in various styles to suit you and your home. A traditional house – tick. A modern home – tick. A home with weird shape rooms – (yes they cover that too) – tick.
They have been the business a long while so you will get experience, knowledge and their expertise in an industry they have built a successful business within.
One stop shop for you home
They also have a magic trick up their sleeves, they don’t just sell the kitchens and bedrooms, they offer a complete service. A dedicated team of fitters, builders and go to electricians, plumbers, basically all the trades you need for doing up your house are available to you through the Kitchen and Bedroom Studio. Both Rob and Geraldine have very high standards so you can rest assured knowing that these people have been vetted within an inch of their lives and given the golden seal of approval.
Shopping here also ensures that you are giving back to your local area. We are big on shop local here at AmberCouch and a large percentage of our clients base, is here in the CF72 area , Cardiff and South Wales. We believe that by growing your local network everyone benefits, the income stays in your area and you can better build long standing relationships with people you can walk to meet with or just pop in the car for a short journey.
@EcoWarriorAndCo You’ve been nominated! Stretton Climate Care – Awwwards Nominee – Awwwards https://t.co/w5BJVgC4qY
We know clients love Google. Being higher in the Google rankings for appropriate search terms will almost certainly increase traffic and that in turn will increase leads and conversions.
When trying to climb the search results ladder, anything you can do to improve your website and make it better for your users can be the difference between being ranked above your competitors or not. Improving the speed and performance of your website is one area that may have been overlooked if you had your site built just a few years ago but today it is an essential part of any design.
Mobile Website Performance
Google loves websites that perform as well on mobile devices as they do on desktop. Websites that respond to the users device are label as “Mobile-friendly” in the search results page Google provides this tool for testing your website. If your site performs poorly on mobile this test will let you know.
Website Design – Load Time
How fast your site loads is also a big deal for Google because it is a big deal for your users. If your site takes longer than 2 seconds to load then your users are going to drop. Again Google provides a tool, PageSpeed Insights, to measure how fast your page loads. It also tells you how you can improve this.
We have just created a redesign for Stretton Climate Care and along with a fresh new look and modern design we have also made sure that it is really fast and mobile friendly. This is something that has now become the de facto standard in our web design process.
So you know we all love WordPress. That being said, there is a lot of things that can bug the heck out of your average developer when building sites with WordPress. For me it the dreaded wpautop function! That’s the little blighter that is responsible for creating a lot of extra line spaces in many of your WordPress posts. It might be a br tag or it might be and empty p tag. Do you want to use html comments in your WordPress post? Not without the wpautop function wrapping them in p tags and causing unsightly white space all over your page. Damn it WordPress stop messing with my markup!
How to Remove empty p tags in wordpress
So there are 2 basic choices if you want to stop wpautop from adding empty p tags
- Use PHP in your functions.php file to remove the wpautop filter
- Use jQuery to clean up all those empty p tags after the page has loaded
The problem with both these methods is they are global, They will happen on every post, every page even all your custom post types. This might not be a problem for you but for me and your basic WordPress author those automatic p tags come in handy when writing simple posts or pages.
Remove empty p tags from specific pages in WordPress
If you want to kill that wpautop function on specific page, for instance when you need to just dump a big blob of custom markup in to the content field then I created a WordPress plugin that will work for you.
Simply download this plugin from the Github repo, upload and activate the plugin and it will add a checkbox to all your posts and pages. Just check that box and bam no more empty p tags on that page or post.
Sunday – the day of rest. That does not need to mean you sit in front of the T.V all day, doing nothing. This last week has been a hetic old week for Ambercouch. Mainly due to recently coming back from a road trip in Arizona but largely to do with the continued blame assigned to jet lag for all my short comings this week.
I’m tired – it’s the jet lag. I’m too busy – It’s the jetlag. I’m behind on my work – It’s the jetlag. Well, no it’s not, quit complaining and organise yourself. There are 24hrs in the day, everyone has the same amount of time each day. Getting outside to clear your mind each day or every couple days can and does actually help bring some clarity to your world.
Come to Pontyclun Networking!
Every other Wednesday AmberCouch meet up with other local businesses from the Pontyclun area at Sovereign Connect. We joined this group at the very end of 2014, maybe you have read the other article we wrote when we were undecided what to do. For us the process of networking wasn’t something we were used to. We have never needed to go out and find work, it all comes through our own website or word of mouth. However, we are a husband and wife team and we work at home, we thought it was a good idea if one of us occasionally left to meet some real people face to face. The novelty!
Here is a gist to force https access of your site through .htaccess. Just add this to your .htaccess file at the route of your site and users will be redirected to https if they do not specify the protocol or try to use http.