hi everybody!
I try to create a simple form with:
a field for the title of the article (title of the book)
a field for writing a summary
So I want that these two fields display in an article.
I found in this forum a form to display information and image into an article.
But I don't understand how it works and so I can't alter it for what I want to do.
here is the on submit code
These code works, image are displayed in the article.
But I want to personalize this code.
For example, I want that the text (summary) displays in bold.
And I would like to display just above the text a message like "here the summary".
Could you tell me how to do that, because I have read a lot of tread and I don't find my answer.
thanks😉
I try to create a simple form with:
a field for the title of the article (title of the book)
a field for writing a summary
So I want that these two fields display in an article.
I found in this forum a form to display information and image into an article.
But I don't understand how it works and so I can't alter it for what I want to do.
here is the on submit code
<p><span style="color: #0000ff;"><strong>Thank you for submitting your article!</strong><br /><br /><a href="cm">Go back to my profile</a></span></p>
<?php
$fulltext_template = "<br /><br /><strong>{file_1}</strong><br /><br /><strong>{file_2}</strong>";
$fulltext_template = str_replace("{file_1}", '<p><img style="max-width:500px;border:5px solid #eeeeee;" src="/Portail/images/form/{form_name}'.JRequest::getVar("file_1").'" target="_blank" ></p>', $fulltext_template);
$fulltext_template = str_replace("{file_2}", '<p><img style="max-width:500px;border:5px solid #eeeeee;" src="/Portail/images/form/{form_name}'.JRequest::getVar("file_2").'" target="_blank" ></p>', $fulltext_template);
JRequest::setVar("fulltext", $fulltext_template);
$_POST['catid'] = '44';
$_POST['id'] = '';
$_POST['sectionid'] = '8';
$_POST['state'] = '1';
$_POST['created'] = date("Y-m-d H:i:s");
?>
These code works, image are displayed in the article.
But I want to personalize this code.
For example, I want that the text (summary) displays in bold.
And I would like to display just above the text a message like "here the summary".
Could you tell me how to do that, because I have read a lot of tread and I don't find my answer.
thanks😉