Page 1 of 1
webform questions

Posted:
Wed Jan 31, 2007 12:09 pm
by Op3r
Hi,
This is my first time to have this kind of question. I have a client that wants to have the first name and the leadid to be inserted on the webform. or it will automatically go to that website eg like this
http://www.client.com/click.php?i=706&c ... =FIRSTNAME
and the VICIDIAL dial should get the leadid and firstname and put it on that url.
is this possible?
any hints?

Posted:
Wed Jan 31, 2007 12:27 pm
by enjay
you could use a webform and in the webform request those variables.. request and vicidial will deliver


Posted:
Wed Jan 31, 2007 12:30 pm
by Op3r
or maybe modify the vicidial.php to have it automatically open up and request those variables?

Posted:
Wed Jan 31, 2007 12:34 pm
by enjay
no it doesnt work that way... heres a simple snippet..
- Code: Select all
//Variables from the URL, passed from vicidial.php
$first_name= $_REQUEST["first_name"];
$middle_initial= $_REQUEST["middle_initial"];
$last_name= $_REQUEST["last_name"];
$phone_number= $_REQUEST["phone_number"];
$alt_phone= $_REQUEST["alt_phone"];
$address= $_REQUEST["address1"];
$city= $_REQUEST["city"];
$state= $_REQUEST["state"];
$gender= $_REQUEST["gender"];
$email= $_REQUEST["email"];
$comments= $_REQUEST["comments"];
$lead_id= $_REQUEST["lead_id"];
$zip= $_REQUEST["postal_code"];
This would go in your web form script to request from vicidial.php

Posted:
Wed Jan 31, 2007 12:50 pm
by Op3r
got it.

Posted:
Wed Jan 31, 2007 12:53 pm
by vctor
Yes it could work like that...
Here's how I would do it
on check_for_auto_incoming() function, once a call is detected there will be values for the lead_id
document.vicidial_form.lead_id.value = VDIC_data_VDAC[0];
and firstname
document.vicidial_form.first_name.value = check_VDIC_array[14];
Once this values are available, I can now create this line
myURL = 'http://www.client.com/click.php?i=706&c=11&p=431&r='+VDIC_data_VDAC[0];+'&fn='+check_VDIC_array[14]
window.open(myURL, 'myownwebform')
That's it (I think)

Posted:
Wed Jan 31, 2007 1:02 pm
by vctor
This could work only if he has access to the other server. Notice that the variable name for lead_id and firstname is different from the ones vicidial uses. So the only way is to create a separate script and follow the parameter the webform is using
enjay wrote:no it doesnt work that way... heres a simple snippet..
- Code: Select all
//Variables from the URL, passed from vicidial.php
$first_name= $_REQUEST["first_name"];
$middle_initial= $_REQUEST["middle_initial"];
$last_name= $_REQUEST["last_name"];
$phone_number= $_REQUEST["phone_number"];
$alt_phone= $_REQUEST["alt_phone"];
$address= $_REQUEST["address1"];
$city= $_REQUEST["city"];
$state= $_REQUEST["state"];
$gender= $_REQUEST["gender"];
$email= $_REQUEST["email"];
$comments= $_REQUEST["comments"];
$lead_id= $_REQUEST["lead_id"];
$zip= $_REQUEST["postal_code"];
This would go in your web form script to request from vicidial.php

Posted:
Wed Jan 31, 2007 1:10 pm
by enjay
... This is how I do it.. and I've written about 3 dozen external vicidial/webforms. I could dive in deeper with you offline 0p3r if you'd like.
-Art

Posted:
Wed Jan 31, 2007 1:26 pm
by Op3r
the main problem art is that i dont have any control for that webform. all I needed was to pass that leadid and firstname and the client's site will auto populate it using the variables passed on the url.

Posted:
Wed Jan 31, 2007 1:38 pm
by enjay
Gotcha then I would definately go with vctors solution and pass it strait from the webform string.
-Art

Posted:
Wed Jan 31, 2007 5:23 pm
by mflorell
With the 2.0.2 release there is another option, to use the SCRIPT tab and you can define the variables as you like, and only define as many as you want.
For more info, see the help section for SCRIPTS in the admin.php script or the VICIDIAL manager manual.

Posted:
Wed Jan 31, 2007 11:01 pm
by Op3r
I've been promoting for the Manager's manual and I didint look at it! oh I think only have the old one though.
Gotacha matt. thanks