Buy Now
Sign in

Submit an article with chronoform ?

g128 , October 17 2017
g
g128

Hello,

I wish from chronoform 5 "submit an article".
I have tested the setup Joomla / Joomla Article, it works well

But I would like to use several fields to structure the "Full text field" like in "email" or "display message" with a bit of html (styles etc ...)

Example:

<span class = "Mystyle"> {Field_1} </ span> <br>
<span class = "Mystyle"> {Field_1} </ span> <br>
...

Is it possible ?

Thank you for your lighting

GreyHead

Hi g128,

You can use a Custom Code action before the Joomla! Article action to build the article content.

				<?php
$form->data['full_text'] = "
<span class = 'Mystyle'> {$form->data['Field_1']} </ span> <br />
<span class = 'Mystyle'> {$form->data['Field_2']} </ span> <br />
";
?>

Bob

ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much

g
g128

Hello,

Thanks GreyHead for your quick reply.

This is perfect and it allows me to understand the db save with chronoform.

I changed "full_text" to "fulltext", it works better;)

I noticed a little oddity with <span>

Here is the article code :

<hr id = "system-readmore" />
<span class = "Mystyle"> xxxxxxxxx <br /> <span class = "Mystyle"> xxxxxxxxx <br /> </ span> </ span>


I will look for where the problem comes from.

Other question:

- Is it possible not to create a <p> </ p> tag?

- Is it possible to save line breaks from a "textarea Box" field?


Thank you very much