Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1563

Administration Joomla! 3.x • Re: How to get article form instance in admin panel?

$
0
0
Can't you do it with Custom Fields?
Technicaly speaking: yes.
But my goal is group some ammount of additionl fields into one plugin. This is will be more useful on my project due to different reasons.

I figured out that in the plugin event onContentPrepareForm(), we have the opportunity to manipulate the form object.

For instance this code in plugin:

Code:

public function onContentPrepareForm($form, $data) {        $xml = new SimpleXMLElement('<fieldname="TEST"type="radio"label="TEST"description="TEST"class="btn-group btn-group-yesno"default="0"><option value="1">JYES</option><option value="0">JNO</option></field>');        $form->setField($xml, null, false, 'editorConfig');}
will add a radio buttons into tab "Configure Edit Screen".
I try to change fieldset in the method setField() on "images" or "attribs" but it dosent work. Idk why.

Statistics: Posted by voron121 — Fri Jun 21, 2024 2:39 pm



Viewing all articles
Browse latest Browse all 1563

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>