I have written some PHP code that can be added to phil-a-form to make auto population work. It connects directly to the mySQL database, and pulls the variable information for the current user who is logged in.
It requires you to use specific FIELD names when creating a form in phil-a-form. The field names you must use are:
First, Last, Email, Company, Title, Address1, Address2, City, Zip, Phone
You will need to edit it to make it fit your custom situation. But this is the information I use:
Database Name: cmcros_cmcrossroadsjoomla
Community Builder Table Name: jos_comprofiler
Joomla! 1.0.13 Stable
Apache, PHP 4.4.7
MySQL 4.1.19
Community Builder: 1.1
Phil-A-Form v1.6.7
Edit the file located:
./components/com_philaform/elements/textbox.php
replace the following code (line 60):
[code:1]
$cleaner = $noHtmlFilter->process($this->value);
$value .= "\" $maxlength value=\"".$cleaner."\"";
[/code:1]
With this code attached with this post.
It works for us at
www.CMCrossroads.com
Let me know if you know of a cleaner or more efficient way to do this.
Attachment autopopulate.txt not found
Post edited by: ripplestone, at: 2008/09/17 01:03
Post edited by: ripplestone, at: 2008/09/23 18:22