0

New to Joomla(one month).

I'm trying to create a module that will list events(names and times). I want the module to be populated from the admin panel. For example lets say the module lists would list the following on the front end:

  1. breakfast ........ 9:30
  2. lunch .............12:30
  3. dinner ............7:30

In the admin panel there will be input text fields for the admin to add/delete the events and a button(s) that will call a js function execute add/delete.

I am using Joomla4 I'm under the impression that all I need to do is tell the manifest file about my button in the configs sections and then write the javascript in the mod_project.php file that will add/delete a field on press. (Perhaps the js needs to go in the tmpl/default.php I'm not entirely sure where to put it) Unfortunately my attempt to add a button in the config file has failed meaning there is no output in the html: current config section of manifest file:

        <fields name="params">
            <fieldset name="basic">
                <field
                    name="event_name_0"
                    type="text"
                    label="Event Name"
                    filter="event"
                />
                <field
                    name="event_time_0"
                    type="text"
                    label="Event Time"
                    filter="event"
                />
                 <button type="submit" id="testBtn" value="Add">Add</button>
            </fieldset>
        </fields>
    </config>
bf613
  • 3
  • 1
  • If you are new to Joomla development, you'll be pleased to know that the Stack Exchange Network has a dedicated community for Joomla questions. See you at [joomla.se] Stack Exchange. – mickmackusa Jul 27 '22 at 23:31

1 Answers1

0

I have to do that yesterday but I have found a solution more simple : I just added a custom field, for my specific category, with the type repeatable and I have written a module to read this specific field.

Seb
  • 65
  • 1
  • 6