You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
Hi, in a little module a form is generated via getForm() etc. The xml hat field name like "currency" and "amount". In the form itself these field names are transformed to "jform[curreny]" and "jform[amount]". If there a way of supressing the addition of "jform[]"? Of course I can use a preg_replace() when getting the inputs, but is there a clean way of doing it? Grateful for any help:-) Mareike
hoochicken
unread,
Nov 6, 2012, 3:05:50 PM11/6/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
Sry, wrong group, I know ...
Mario
unread,
Nov 7, 2012, 5:52:59 AM11/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
probably wrong place but check the class and method and you'll figure it out ;)
in libraries/joomla/form/field.php at line 528 you'll find how it is formed and how you can use it without the jform[fieldname]
Donald Gilbert
unread,
Nov 7, 2012, 9:41:38 AM11/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
When you instantiate the form using loadForm method in your model (or in JForm::getInstance() if you're calling that directly), you can pass in a third parameter of options. In administrator/components/com_content/models/article.php on line 300, you'll see how com_content does this. It passes jform through as the 'control' parameter of the options array. What you would want to do is set that to null instead, and it will do what you want.
hoochicken
unread,
Nov 7, 2012, 4:45:06 PM11/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to joomla-...@googlegroups.com
Thank you very much for the answers. Just for information, setting "control"=>"" in loadForm() did it.