I want to have an article picker in my custom module. A button and a form field like this one in add new article.
Is ist possible? I tried this in my module xml:
<field name="article_id" type="modal_article" default="" label="Select an article" description="" />
But I only get a form input, not a button to choose an article.
You need to manually add the path to the modal article element. In the < fieldset > element just above the modal_article field type, add the following attribute:
addfieldpath="/administrator/components/com_content/models/fields"
So your final xml would look something like this:
<fieldset name="basic" addfieldpath="/administrator/components/com_content/models/fields">
<field name="article_id" type="modal_article" default="" label="Select an article" description="" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With