Kal
Kal

Reputation: 1774

ADD ITEM button in a simple Joomla Module

I am creating a simple and FREE joomla module that will slide items added by a user. I dont know how to create a "ADD ITEM" button in the module that will repeat the field in the admin screen of the module to allow the next entry.

Example - Below is how my module backend will look

screenshot

My Module has a field group

<fieldset name="sliders" description="To add an item,Click Add New" label="Item - ADD/EDIT Here">
    <field type="sliders" name="sliders" />
</fieldset>

Then I have a fields folder in the module with a sliders.php

Not sure where to go from here.

Upvotes: 1

Views: 1001

Answers (2)

Kal
Kal

Reputation: 1774

ok, So Joomla 3 has its own repeatable field option. Just used the code below and worked.

<field name="list_templates"
type="Repeatable"

Upvotes: 1

Sean Jermey
Sean Jermey

Reputation: 121

For this you would need to make a new form field which will not be easy.

a simpler (built in) solution would be to use jform repeatable.

https://docs.joomla.org/Repeatable_form_field_type

Upvotes: 1

Related Questions