Keyword

Set Category in front end add

More
11 years 1 month ago #117731 by Euan
Set Category in front end add was created by Euan
Hi All

i want to set the default category in the front end item add ,programmatically through a plugin (dont want to edit the form template)

basic senario is

if URL parameter = A, set category to A
else
set category to value from user profile


I have the 2nd part working via a plugin using onBeforeK2Save, however the url doesnt carry through due to the form posting to index.php

what i really need is onContentPrepareForm for K2, i have tried the standard joomla onContentPrepareForm but cant seem to get it to fire

any idea

thanks in advance

E

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 1 month ago #117732 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: Set Category in front end add
You can use
JRequest::get('parameter');
to get any parameter value

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum