Forums

How to automatically fill fields in Submit Article event?

DrumminManPB 01 Dec, 2013
Hi to every one, I have some questions..
At first, my situation: I have a some form, which I need to be published as an article, after all required fields are filled. So, I need get the value from "Article_name" field in form, and insert it in "Article title Name" in "Submit Article" event. After that, it's needed import value from one of dropboxes as a category of submitting article.. And after that - info from all fields as a text in the article body, with same structure.
I suppose, what I can do it with some variables, but with which, and where, and how?
GreyHead 01 Dec, 2013
Hi DrumminManPB,

Have you tried searching the forums? - this has been answered several times before, I think that last week was the most recent. I'm not sure if that handled categories though.

Bob
DrumminManPB 01 Dec, 2013

Hi DrumminManPB,

Have you tried searching the forums? - this has been answered several times before, I think that last week was the most recent. I'm not sure if that handled categories though.

Bob


Yeah, I've tried, but without any useful results.. anyway, I'd part of answers by the poke-method)
GreyHead 01 Dec, 2013
Hi DrumminManPB,

Try here or here. There an older one here about Categories.

Bob
DrumminManPB 02 Dec, 2013

Hi DrumminManPB,

Try here or here. There an older one here about Categories.

Bob


Thanks, already reading it.. this one was really useful, I just slightly modified php-code for more readable view, like that
<?php
$tmpl .=<<<EOF
[HTML-code for template]
EOF;
?>
.. but still have a problem with a categories, I made the hack u'd described, made a new form with right ("catid") name of dropbox name field, I'd even got a record in DB with right value, but published article has no category at all.. mby, I've missed smthing..
anyway, I'm really impressed with the functional of ur ChronoForm, it just needs lilbit more documentation))
GreyHead 02 Dec, 2013
Hi DrumminManPB,

If the category isn't being set like that then it may be simpler to grab the article ID after the Submit Article action and use Custom Code to update the category in the #__content table. (Or alternatively, if you are OK coding, then ditch the Submit Article action and do the whole save using Custom Code; I think I did that for the old FAQ system.)

I agree with you about documentation . . . I wrote a book about CFv3 which came out just in time for CFv4, I wrote a hundred or so FAQs for CFv4 and CFv5 is due out in the next day or so. Never did get my head completely around CCv4 (Sloan Thrasher is better at that).

Bob
DrumminManPB 05 Dec, 2013
huh, I found the moment I've missed.. values names in dropbox didn't correspond with categories IDs.. well, I owe u beer))
by the way, for the tagging submitted article, should I use Meta Tagger Event?
GreyHead 05 Dec, 2013
Hi DrumminManPB,

I think that the Meta Tagger action will just tag the form page (I've never used it). You'd need to add the tags you want to the article record to get them used with the article.

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