Codeigniter is an MVC based on PHP scripting language, MVC stands for Model View Controller. Small description about model view controller given below, take a look,

Model: Model used for the database, where we write queries code.
View: View is for design files or view files of our project.
Controller: Controllers are used for written functionality of the project or working of the project defined by some functions.


Smarty is a PHP template engine which uses for templating or designing the pages. Smarty may be an example engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. this suggests that PHP code is application logic, and is separated from the presentation.

Main Goal of Smarty

  • clean partition of introduction from application code
  • PHP backend, Smarty demonstrate frontend
  • supplement PHP, not supplant it
  • quick improvement/organization for software engineers and architects
  • snappy and easy to keep up
  • grammar easy to know, no PHP information required
  • adaptability for custom improvement
  • security: protection from PHP
  • free, open supply

1. First, create a design and adding some javascript code for multiple fields like this

JS or javascript code for Adding multiple fields by using that plus button.

Also using SMARTY template engine, check below code
On SMARTY all <script> tags are written in {literal}

Was this article helpful?

By Bikash

My name is Bikash Kr. Panda. I own and operate PHPCODER.TECH. I am a web Programmer by profession and working on more than 50 projects to date. Currently I am working on the web-based project and all the CMS and frameworks which are based on PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *