121 Posts
deralex
8 years ago
Topic

Hi!

I'd like to add a menu item that links to a form. The form id should be passed dynamically, using the user id. Let's say:

user 15 -> article id 12
user 23 -> article id 9

I've written the php script that works fine. How (or where) can I set the url parameter? Is there a way using BeforeRender?

Alex

Get a Book for SEBLOD
4229 Posts
Kadministrator
8 years ago
2
Level 1

Once form is loaded you can't alter id of the loaded form, only way to do that would be to use redirect. To do that you would like to do you would need to use joomla plugin events that happen before seblod form is loaded

https://docs.joomla.org/Plugin/Events/System

and set id value of the JInput object, so that seblod would think url contained this id.

121 Posts
deralex
8 years ago
1
Level 2

That's it - thank you!

1283 Posts
Bucklash
8 years ago
0
Level 3

Hi deralex

So how did you get on?

Any tips or examples you could share?

I'm looking to do something similar so be great to see an example.

Bucklash

Get a VIP membership