cant get the category to work
Posted: 28 June 2007 08:56 PM   [ Ignore ]
Member
RankRankRank
Total Posts:  51
Joined  2007-06-28

Newbie so I am probably doing something wrong. I downloaded the form helper to create and editing form, still not sure I did the right thing as I couldnt really find out what people used to create entry forms. Form helper seems pretty simple have everything working except the categories to work.

I have this in my html

<tr class="row0">
<
td valign="top" class="light">Categories</td>
<
td valign="top"><select multiple name="category[]">
{exp:form_helper:categories entry_id="{entry_id}" parent_id="1"}
<option value="{cat_id}" {selected}>{cat_name}</option>
{/exp:form_helper:categories}
</select></td>
</
tr>

and it returns this

<tr class="row0">
<
td valign="top" class="light">Categories</td>
<
td valign="top"><select multiple name="category[]">

</
select></td>
</
tr>

but it is gathering categories as the one below is retrieving “pen and ink”

<tr class="row1">
<
td valign="top" class="light">Categories</td>
<
td valign="top"><input type="checkbox" name="category[]" value="20"  />pen and ink<br /></td>
</
tr>

many thanks if someone can help me out, ther arent many posts here so maybe I am barking up the wrong tree.


Adam

Profile
 
 
Posted: 28 June 2007 09:16 PM   [ Ignore ]   [ # 1 ]
Member
RankRankRank
Total Posts:  51
Joined  2007-06-28

I changed the parent_id in the first bit of the code to 0 and now it returns the category ‘pen and ink’ which is obviously where its from shouldn’t be retrieving all categoris from EE so a choice can be made.

regards

Adam

Profile
 
 
   
 
 
‹‹ Email Addresses      photo upload what to use ››