saber
saber

Reputation: 346

pass joomla article id to modal iframe form

I have a view in my joomla 2.5 component and a form at this. now I'm show this form pop up in my article by this code by use joomla modal and it's work

<a class="modal"  rel="{handler: \'iframe\', size: {x: 600, y: 375}}" href='.$formlink.'>my text</a>

now how can I send my article id to this form for insert it to my database? I want pass my article id to iframe form.

Upvotes: 0

Views: 388

Answers (1)

saber
saber

Reputation: 346

i found how can do it. we can do it use this code:

$id = $article->id; $formlink = JRoute::_("index.php?option=com_mycomponent&view=myview&tmpl=component&id=$id")

Upvotes: 1

Related Questions