[Vtigercrm-developers] faq loosess leading spaces..

Prasad prasad at vtiger.com
Fri Apr 11 10:35:36 PDT 2008


Hi Gregory,

The leading and trailing spaces are trimmed off from the input values in the
following:

File: include/utils/CommonUtils.php
function setObjectValuesFromRequest($focus)

The highlighted line of code can help you to preserve the leading and
trailing spaces for Faq module record saving.
NOTE: This code is based on vtiger 5.0.4

function setObjectValuesFromRequest($focus)
{
    global $log;
    ...
    if(isset($_REQUEST['mode']))
    {
        $focus->mode = $_REQUEST['mode'];
    }
    foreach($focus->column_fields as $fieldname => $val)
    {
        if(isset($_REQUEST[$fieldname]))
        {
            if(is_array($_REQUEST[$fieldname]))
                $value = $_REQUEST[$fieldname];
            else if ($_REQUEST['module'] == 'Faq')
                $value = $_REQUEST[$fieldname];
            else
                $value = trim($_REQUEST[$fieldname]);
            $focus->column_fields[$fieldname] = $value;
        }

Hope you find this useful.

Regards,
Prasad
vtiger Team

On 4/11/08, Gregory Machin <greg at ct-net.org> wrote:
>
> Hi
> I have been creating some faq's today and I noticed that once u save the
> faq it loose all the leading spaces of each line and when u edit again
> it the spaces are there ... I have a faq that has alot of indentation
> (leading spaces) and with out it, it looks very messy.. how do I get
> past this ?
>
> notes
> work station >
> Using gedit to type the documents ... copy pasted into the faq and
> edited again to fit
> Using firefox 2.0.0.13
> Using linux Fedora core 8
>
> Thanks
>
>
> --
> Gregory Machin
> CT-Net
> www.ct-net.org
> greg at ct-net.org
> phone : +27 12 379 3497
> fax   : +27 12 379 4113
> Cell  : +27 72 524 8096
>
> humans do not use the address
> below its for trapping spam.
> spamtrap  imasucker at ct-net.org
>
> _______________________________________________
> Reach hundreds of potential candidates - http://jobs.vtiger.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20080411/6954b26c/attachment-0003.html 


More information about the vtigercrm-developers mailing list