I am putting together a form that allows users to submit an article, but with custom fields.
First, I would like them to be able to choose which category (in a specific section) the article is submitted to. I got the dropdown box with the correct categories to appear using this code (formatted this way due to css styling):
<div class="form_item">
<div class="form_element">
<label class="cf_label">
<b>Category</b>
</label>
<?php
echo JHTML::_('list.category', 'field_name', '9');
?>
</div>
<div class="clear">
</div>
</div>
However, when I do a test run to try to submit something to a category, it just goes to Uncategorized within that section. I assume the issue is in the code I have under On Submit after email, which is this:
<?php
$_POST['catid'] = ' ';
$_POST['id'] = ' ';
$_POST['sectionid'] = '9';
$_POST['state'] = '1';
$_POST['created'] = date("mm-dd-YYYY");
?>
I simply don't know what to put instead of ' ' for catid. The search results I've found on here have been bits and pieces of the problem, and I haven't been able to mix and match solutions to correctly result in a Categories drop down box that appears the right way in the front end and actual successful submission to selected Category.
Second, while I can get whatever is typed into the HTML Editing box on the form to appear as an article, as well as the title and the username from Community Builder, I can't get any of the custom fields (and subsequent entries) to appear, either on the page as published information or as part of the saved article in the backend. Just a horizontal line and whatever was entered into the HTML box. I *think* I may have to edit core Joomla files to fix this, but I would just appreciate being pointed in the right direction if possible as to where to get the information on what files I need to hack into and edit, as I really have no idea.
Sorry for being such a beginner. I really appreciate this extension as well as the support! Thank you!