Insert a url value by javascript into a field in Breezing Forms - Breezing Forms / FacileForms how to's

Pass a field to another field in Breezing Forms with Javascript

Home Joomla - VirtueMart Breezing Forms / FacileForms Insert a url value by javascript into a field in Breezing Forms
Insert a url value by javascript into a field in Breezing Forms
  • Joomla 1.5/2.5/3
  • Breezing Forms/
    FacileForms

It is often useful to have a url value inserted in your Breezing Forms / FacileForms form before you submit it.
Here is a jquery method of inserting a url value into a field in your Breezing Forms / FacileForms form.


In your form->Advanced->More Options:

in the Scripts->Initialization Script section click the create Framework to establish the trigger

Then a call and function are required.
If your form is My_Form, url var is &myvar=xxxx and the text field is id ff_elem201



function ff_My_Form_init()
{
jQuery("#ff_elem201").val(getParameterByName('myvar'));

function getParameterByName(name)
{
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.search);
if(results == null)
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
} 





Last Updated on Saturday, 11 July 2015 10:21
 

Latest Articles

VirtueMart
Your Cart is currently empty.

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.



Insert a url value by javascript into a field in Breezing Forms|Breezing Forms / FacileForms how to's



Pass a field to another field in Breezing Forms with Javascript


form, var, forms, breezing, results, function, url, facileforms, replace, regex, regexs, field, elem, return, jquery, getparameterbyname, myvar, value, val, init, window, null, decodeuricomponent, search, location, exec, regexp, trigger, inserting, advanced, options, method, submit, joomla, useful, inserted, scripts, initialization, establish, required


guru

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.