Today I had the problem of having to create a form for leads for my website. Using the native functions of VTiger the form was saved correctly, but the fields were not present. I have installed the version 6.4
Searching the net I found the solution to this link:
In practice operate in this way:
1.
CREATE TABLE `vtiger_webforms_field` ( `id` int(19) NOT NULL AUTO_INCREMENT, `webformid` int(19) NOT NULL, `fieldname` varchar(50) NOT NULL, `neutralizedfield` varchar(50) NOT NULL, `defaultvalue` varchar(200) DEFAULT NULL, `required` int(10) NOT NULL DEFAULT ‘0’, `captcha` int(1) NOT NULL DEFAULT ‘0’, `roundrobin` int(1) NOT NULL DEFAULT ‘0’, `roundrobin_userid` varchar(256) DEFAULT NULL, `roundrobin_logic` int(11) NOT NULL DEFAULT ‘0’, PRIMARY KEY (`id`), KEY `webforms_webforms_field_idx` (`id`), KEY `fk_1_vtiger_webforms_field` (`webformid`), KEY `fk_2_vtiger_webforms_field` (`fieldname`), CONSTRAINT `fk_1_vtiger_webforms_field` FOREIGN KEY (`webformid`) REFERENCES `vtiger_webforms` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_3_vtiger_webforms_field` FOREIGN KEY (`fieldname`) REFERENCES `vtiger_field` (`fieldname`) ON DELETE CASCADE )
2.
ALTER TABLE `vtiger_webforms_field` ADD `sequence` INT NULL DEFAULT NULL AFTER `required` , ADD `hidden` INT NULL DEFAULT NULL AFTER `sequence`
CAUTION:
to me it worked but before I made a backup of the database
This information DATES ARE WITHOUT ANY WARRANTY OF SAFETY AND IF THEY WORK ON OTHER VERSIONS VTiger
Open embedded links in comments in new window
Last week I need to find out a solution for a my friend. He want to open all links embedded in comments in a new windows.
I searched on google for more time unti I found the solution, to use an hook.
Because I think other people will need a solution for this problem or maybe for a similar problem, I will describe it the solution, step by step. Are you ready? Go…
Step 1 Find the file named functions.php in your theme folder (every theme has this file) and open it for edit
Step 2 At the end of the file you can create the function to open the links in new windows, like this:
function comment_text_target_blank( $comment ) {
$pos = strrpos($comment,”_blank”);
if ($pos===FALSE) {
$theComment = str_replace(“<a”,”<a target=’_blank’ “, $comment);
} else {
$theComment = $comment;
}
return $theComment;
}
Step 3 create the hook to apply new function
add_filter(‘comment_text’, ‘comment_text_target_blank’, 1000);
This solution works for me from version 3.4.2 and newer of wordpress. I hope I helped you.
Share this: