Forums

chronoform for send and article

alfredopacino 30 Jan, 2014
hi, i have a section where the user can send articles.
there is a way to send articles through a chronoform form?
alfredopacino 30 Jan, 2014
sorry now i saw the submit acticle action🙂
but still a question:
i want to publish the article with a predefined template, exactly like the email send action.
can i do that?
alfredopacino 30 Jan, 2014
i tried a custom code before submit article:
<?php $form->data['fulltext']= "age: ".$form->data[age]."<br>city: ". $form->data[city];
?>


doesnt work
GreyHead 31 Jan, 2014
Hi alfredopacino,

What do you see when you add a debugger? Your PHP is missing some 's, I'm not sure if they are needed though.

Bob
alfredopacino 31 Jan, 2014
in the debugger i don't see any problem, but the custom code it doesn't take any effect.
in the submit article action i didnt set introtext and fulltext
Array
(
    [chronoform] => joboffer
    [event] => submit
    [Itemid] => 134
    [option] => com_chronoforms
    [view] => form
    [cerco] => jj
    [eta] => jj
    [citta] => jj
    [dettagli] => jj
    [input_submit_3] => Submit
    [d913eea69dae57aa40ee64b1be043049] => 1
    [fulltext] => 
    [created_by] => 0
    [created] => 2014-01-31 12:17:15
    [catid] => 13
    [sectionid] => 0
    [state] => 1
    [title] => jj
    [introtext] => 
    [created_by_alias] => 
    [language] => *
    [alias] => jj
    [id] => 
    [Article] => Array
        (
            [cf_uid] => f333930327615cf89dc773bdadc1dd5f
            [cf_created] => 2014-01-31 12:17:15
            [cf_created_by] => 0
            [cf_ipaddress] => ::1
            [cf_user_id] => 0
            [chronoform] => joboffer
            [event] => submit
            [Itemid] => 134
            [option] => com_chronoforms
            [view] => form
            [cerco] => jj
            [eta] => jj
            [citta] => jj
            [dettagli] => jj
            [input_submit_3] => Submit
            [d913eea69dae57aa40ee64b1be043049] => 1
            [fulltext] => 
            [created_by] => 0
            [created] => 2014-01-31 12:17:15
            [catid] => 13
            [sectionid] => 0
            [state] => 1
            [title] => jj
            [introtext] => 
            [created_by_alias] => 
            [language] => *
            [alias] => jj
            [id] => 18
        )

    [article_id] => 18
)
Validation Errors: 
Array
(
)
GreyHead 01 Feb, 2014
Hi alfredopacino,

As you can see both introtext and fulltext are empty so something is wrong with your code.

And you will need to put an input name into at least one of the boxes in the submit article action.

Bob
alfredopacino 01 Feb, 2014
i don't know what's wrong with my code..
alfredopacino 01 Feb, 2014
introtext and fulltext are empty because i want fill them merging other text fields in custom code..
i guess i can't use $form->data['fulltext'] for defining its content, or maybe the sintax is wrong..
help me..
GreyHead 08 Feb, 2014
Hi alfredopacino,

introtext and fulltext are empty . . . that is the problem. If you want to fill them then you need to add Custom PHP to do that.

Neither $form->data['age'] nor $form->data['city'] exist in your form data, you need to correct that.
Have you fixed the quote problem?

Bob
alfredopacino 08 Feb, 2014
thanks as always for support but the customer changed mind, i dont need this anymore.
sorry for bothered you.
anyway i guess it was just this silly mistake you saw:
$form->data['city'] not exist, there is a $form->data['citta'] (italian translation)
alfredopacino 09 Feb, 2014
uhm i need this again..
i noticed if i move debugger before submit article $form->data['fulltext'] are correctly filled,
i guess i cant personalize the fulltext content with a custom code?
GreyHead 10 Feb, 2014
Hi alfredopacino,

Yes, of course you can, that's what this is all about. You use PHP in the Custom Code action to change or set the value of $form->data['fulltext']

Bob
This topic is locked and no more replies can be posted.