Copy link to clipboard
Copied
Hi,
I know it's probably not a standart thing but can there be some workaround to let customers classify web app items that they submit. I'm aware of the ability to clasify in admin console for users.
Thanks
Hi Gavin
You can use this :
<select name="CAT_Category" id="CAT_Category" class="cat_listbox" rows="4" multiple="multiple">
{module_categorylist}
</select>
Gregory
Copy link to clipboard
Copied
If you want to do this for sorting purposes, you should just create lots of generic classifications and give them a dropdown list to select from. In theory, creating your own classification is cool...but like communism, this idea sucks. How would you go about managing a page that has 1million classification types?
Although I may be wrong, I'd say the answer is NO anyway. If you could dynamically populate classifications from webforms, there is still no inherent way to select these new classifications for a list view module parameter.
You COULD do it manually with an input field called "Classification", once the webapp is submitted:
1. Find the classification name
2. Create a new classification
3. Go to your list view page (or wherever you'd like all your webapps to show)
4. Insert new webapp for only this new classification
This would be viable if you had like 6 users, maybe 7. But realistically this wont work for most cases.
Copy link to clipboard
Copied
<tr>
<td><label for="CAT_Category">Category</label><br />
<select name="CAT_Category" id="CAT_Category" class="cat_listbox">{module_categorylist}</select></td>
</tr>
Add this code to the webapp customer input form and check. You will get result.
Copy link to clipboard
Copied
Hi Gregory
I know we could do a test, but thought I'd ask you first
That snippet of code renders the category list as a drop-down select box. That implies one can only select a single category on the input form? Could it be changed to a multi-select listbox, for example, and then assign the webapp item to multiple categories?
Gavin
Copy link to clipboard
Copied
Hi Gavin
You can use this :
<select name="CAT_Category" id="CAT_Category" class="cat_listbox" rows="4" multiple="multiple">
{module_categorylist}
</select>
Gregory
Copy link to clipboard
Copied
Here is what you can use to select multiple categories for user submitted webapps:
<tr>
<td>
<label for="CAT_Category">Category</label><br />
<select multiple="multiple" name="CAT_Category" id="CAT_Category" class="cat_listbox">{module_categorylist}</select>
</td>
</tr>
Message was edited by: LiamDilley - Just put the code in a code formating for you
Copy link to clipboard
Copied
Thanks, yes, that's what I meant by can we change it to a multi-select Just wanted to know if the prcocessing acepted that
Many thanks, very helpful!
Copy link to clipboard
Copied
Hi there, I have the same requirement for adding news items for a multi location company, however, when I add the code from above a new item is not created.
This is the code I am using.
<form name="catcustomcontentform79350" onsubmit="return checkWholeForm79350(this)" enctype="multipart/form-data" method="post" action="/CustomContentProcess.aspx?A=EditSave&CCID=8210&OID={module_oid}&OTYPE={module_otype}">
<table class="webform" cellspacing="0" cellpadding="2" border="0">
<tbody>
<tr>
<td><label for="ItemName">Item Title</label>
<input class="cat_textbox_small" type="text" name="ItemName" id="ItemName" maxlength="255" /> •</td>
</tr>
<tr>
<td><label for="Upload_Photo">Upload Photo</label>
<input class="cat_textbox_small" type="file" name="{tag_image}" id="{tag_image}" /></td>
</tr>
<tr>
<td><label for="ItemDescription">Item Description</label>
<textarea name="ItemDescription" id="ItemDescription" cols="10" rows="4" class="cat_listbox"></textarea></td>
</tr>
<tr>
<td><label for="CAT_Category">Location</label>
<select name="CAT_Category" id="CAT_Category" class="cat_listbox">{module_categorylist}</select></td>
</tr>
<tr>
<td><input class="cat_button" type="submit" value="Submit" id="catcustomcontentbutton" /></td>
</tr>
</tbody>
</table>
<script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
<script type="text/javascript">
//<![CDATA[
var submitcount79350 = 0;function checkWholeForm79350(theForm){var why = "";if (theForm.ItemName) why += isEmpty(theForm.ItemName.value, "Item Name");if (why != ""){alert(why);return false;}if(submitcount79350 == 0){submitcount79350++;theForm.submit();return false;}else{alert("Form submission is in progress.");return false;}}
//]]>
</script>
</form>
Copy link to clipboard
Copied
Thanks so much for all the feedback! Most helpful
Copy link to clipboard
Copied
Can you please let me know the URL I can see this form on? If you want you can send me a PM an dI will look into this.
Copy link to clipboard
Copied
Hi Gregory,
Do you know if there's any way to create a dropdown list of a few category lists? Using the code above works great, but it inserts all categories across entire site. We'd like the cull the site on a per-web app basis so narrow down the choices a user has when classifying in the edit view.
Copy link to clipboard
Copied
Do it like so:
-put the module in the form like David Camerotto did above
-view the form in the front-end
-get the HTML code outputted by the form
-replace the {module_categorylist} in the back-end with the code you copied from the front-end
You can now remove the unneeded categories.