Tag > jquery
Most people are aware of the plugins for WordPress that help you create forms – Contact Form 7 and Ninja Forms etc. But what about building your own custom ajax contact form using the admin-ajax WordPress functions. Well here is a starter tutorial which I have created where I am guessing you already know the basics of how to create custom themes and pages in WordPress.
So lets start with what are AngularJS and CRUD?
First AngularJS (AngularJS link) is made by google, and is the new popular way of data manipulation (and more) direct in html with minimum code.
Second is the term CRUD which is an acronym for create, read, update and delete which simply relates to major functions that are implemented in relation to controlling data in applications.
With the tutorial you will be learning:
- How to loop through an array of data and update a tables rows with this data
- How to add a button to delete individual rows from the table
- How to add a button to edit individual rows from the table
- How to add a button to add new rows of data to a table
I had a client contact me with an email containing the following screenshot of a popup which has suddenly appeared when viewing their website with certain browsers – a website which has been up and live for over 12 months with no issues.
I was recently working on a website were the PHP function was doing a var_dump of the array and making it into a stdClass. The problem that I had was that there was also some jQuery code that needed to validate the data had been retrieved successfully. So the stdClass object needed to be converted to JSON data.
Here is how…
I had an issue in WordPress where blank searches were still being passed and bringing back results. So I had to find a way of stopping it from being submitted. Searching the web I found this nice little solution/snippet of code from (PAGE/URL NO LONGER EXISTS): http://callmenick.com/2013/04/24/prevent-empty-searches-in-wordpress/