What do you want to cook?
Quick Recipes & Easy Meal Ideas! Let’s Find a Good Recipe!
Slider

Input Layer

There are times when you need to communicate with your visitors, and you need to allow them to input data into your website for different features. You can use the input layer to do this, which is creating a fancy HTML input, where people can write what you need. It can be used to allow search on your site or subscribe to your newsletter. You will need some coding knowledge though to handle this information. You can either send the data to a php file, where you can query with post or get methods, or you can use javascript to manage the entered value.
Input layer settings

Recipes Block

Description: Find the secrets! Do you have a million unique content? Use the search area as navigation!

Tags: , ,

Why would you need an input layer?

I presume you don’t like spending hours on a website trying to find the content you are interested in. It’s boring and tiring, and none of your users will have the patience to go through your hundreds of posts or articles to find that one they would like to actually read. Using the input layer, you can build a keyword-based search: the user enters a keyword, hits search and some backend codes will run in your site, providing your user with relevant content that will most likely interest them.

If you have a webshop, or you do a campaign to get more activity on your site, you might have considered sending out some newsletters, or you might already do it so. Subscribing such a newsletter requires the user to enter their email address, and using the input layer, you can create a fancy field where they can type the address, and hit a subscribe button to be up to date with your latest products, articles, blog posts or anything you would like to tell them.
input on slider

Which one to use? POST and GET methods

The difference between these two methods is that when you send your data with GET, you will have them the variables in the url, while POST sends it through in the background, so the data is not visible in this case for an average user. Because of this, the GET data will be added to the browser’s history, so GET method shouldn’t be used to handle sensitive information like password. Also the GET method has character limitation around 2000 characters. Sometimes POST method has its own disadvantage as many web servers don’t allow to send through variables with the word “http” in it for security reasons, so you won’t be able to catch a website address, unless you encode them first, and you will need another custom code for that.

AJAX

You can also use AJAX to send in the entered value from the input, which is a combination of JavaScript and PHP. You could use JavaScript to get the entered values from the input field, send it to a PHP file via AJAX, without the user having to refresh the page. The AJAX requests are handled in the background, so the data sent to the PHP file will work without the user noticing it. It’s good, because PHP can be used to create more complex codes (e.g. send an e-mail, or do a search in your database) that can’t really be done using only JavaScript.

Similar Sliders -

How to create subscribe section with Smart Slider 3?

Related pages