Hi, π
I'm using the submitcontent form, which is really greatπ
but I need to have each article writer to select a category as in the classical "submit an article" page from the Joomla Core. I tried many things (pasting the code from the "submit an article" page to my form, etc.), but none works.
I'm a beginner in PHP, but I tried to code myself. Maybe I took a wrong way right from the start, or maybe I've done a huge and obvious error. Anyway I think that won't be hard for you to find out!!!π
So far I have something like this in the "Form HTML" part :
Thanks a lot for helping me π
I'm using the submitcontent form, which is really greatπ
but I need to have each article writer to select a category as in the classical "submit an article" page from the Joomla Core. I tried many things (pasting the code from the "submit an article" page to my form, etc.), but none works.
I'm a beginner in PHP, but I tried to code myself. Maybe I took a wrong way right from the start, or maybe I've done a huge and obvious error. Anyway I think that won't be hard for you to find out!!!π
So far I have something like this in the "Form HTML" part :
Choose a category : <div class="clear">
<form action="" method="post" name="category" id="category">
<label></label>
<select name="category" id="category">
<option>category1</option>
<option>category2</option>
<option>category3</option>
</select>
</form>
</div>
and this in the "On Submit code - after sending email" part : <?php
$category=$_POST['category'];
$goandfind_req= "SELECT id FROM jos_categories WHERE ".$category."= title";
$goandfind=mysql_query($goandfind_req);
$_POST['catid'] = $goandfind;
$_POST['id'] = ' ';
$_POST['sectionid'] = '1';
$_POST['state'] = '0';
$_POST['created'] = date("Y-m-d H:i:s");
?>
Thanks a lot for helping me π
Hi tergra,
There are a couple of things that might be causing problems but one that surely is - please remove the <form> tag from the Form HTML, ChronoForms write sit own and two will cause problems.
Which version of Joomla are you using?
Bob
There are a couple of things that might be causing problems but one that surely is - please remove the <form> tag from the Form HTML, ChronoForms write sit own and two will cause problems.
Which version of Joomla are you using?
Bob
Thanks for answering me, I'm using J1.5π
What do you mean by "please remove the <form> tag from the Form HTML"? Where is that "form" tag?
Thanx a lot
What do you mean by "please remove the <form> tag from the Form HTML"? Where is that "form" tag?
Thanx a lot
Hi tergra,
those are the form tags :
other issue, use directly this code in your form and remove the SQL you have :
Cheers
Max
those are the form tags :
<form action="" method="post" name="category" id="category">
and </form>
other issue, use directly this code in your form and remove the SQL you have :
<select name="catid">
<option value="1">Category 1</option>
<option value="2">Category 2</option>
</select>
Cheers
Max
Hello !
So it can be this as well :
Works perfect for meπ
Just need to understand a bit more the component, but it seems this is what I desperatly needed...
Just a question : can I edit again the form thru front office ? (not as an article, but as the original posted form ? )
You rocks !π
So it can be this as well :
<?php
$category=$_POST['catid'];
$_POST['id'] = '';
$_POST['sectionid'] = '8';
$_POST['state'] = '1';
$_POST['created'] = date("Y-m-d H:i:s");
?>
Works perfect for meπ
Just need to understand a bit more the component, but it seems this is what I desperatly needed...
Just a question : can I edit again the form thru front office ? (not as an article, but as the original posted form ? )
You rocks !π
Hi crony,
you even don't need this line :
that's if you will use my dropdown code above.
Cheers
Max
you even don't need this line :
$category=$_POST['catid'];
that's if you will use my dropdown code above.
Cheers
Max
This topic is locked and no more replies can be posted.