Posts

Showing posts from June, 2015

Virtual host - ubuntu(linux)

Create(set) virtual host as local domain- ubuntu(linux) Sometimes we need to create a local domain for the sites in our local server. To accomplish this purpose, we need to create a virtual host entry in apache hosts and respectively create its dependencies as well. Example : localhost/myproject => myproject.localhost To meet the above described requirements, we need to follow below steps over your terminal(command-line) considering you are at /(root) directory: 1- Create your site's conf file under the directory : etc/apache2/sites-enabled. Enter command : - sudo cp /etc/apache2/sites-enabled/default.conf /etc/apache2/sites-available/myproject.localhost.conf - sudo nano /etc/apache2/sites-enabled/myproject.localhost.conf Make the changes as defined below: <VirtualHost *:80>         ServerAdmin webmaster@localhost         ServerName myproject.localhost         DocumentRoot /var/www/myproject         <Directory /var/www/myproject>            

Gravity form tweaks and techniques

Gravity form tweaks Gravity form -  Multiple form instances on same page Sometime you need to call gravity form multiple times on the same page but this needs some amendments to the normal flow of gravity form. Here I am going to demonstrate  how you will meet this requirement. I have used one wp plugin "Gravity Forms: Multiple Form Instances" and done some modifications to facilitate the following requirement : 1- Need to make it work for a single form and leave rest as it is as most of the validation is based on the form ids. 2- In multiple form instance plugin random ids are generated to differentiate same form access as multiple instance. I have made it little simple by using sequential ids rather than random number. Like : Form id - 15 will be accessed over one page as 151, 152,153 and so on. Follow the below steps: 1- Perform below amendment in the function "gform_get_form_filter" definition in plugin file as under. public static $cnt = 0; self