Need code for the submit or save button.

Last updated by kisssssss4ever Comments (2)

Dear Elggers

Good Day!

Let's say I created one extra custom dropdown field and I want to add one Submit or Save button next to it.

I did try many times to add Save button next to my dropdown field by using the following codes

 echo elgg_view('input/submit');

The submit buttons shows right there but when it does not save the changes in dropdown field. When I refresh the page, I can see there is no any changes.

I tried to get help from here

But still no luck, please guide me, I have one dropdown button called Turn Off & Turn On... I want to add only save or submit button next to that, when users select Turn Off then it should save Turn off and when users save Turn ON then it should save as Turn ON in the page.

Appricate your help, many thanks in advance.



  • you need to create a form php file in your plugin


    that's where you put your input fields then call

    echo elgg_view_form('example');

  • Thanks $('Cim') for the reply.

    You said create a form php file /mod/example/views/default/forms/example.php

    So I created as follow


    Now I want to know which codes I will insert in forms/geoplugin.php file? The codes from mod/geoplugin/views/default/plugins/geoplugin/usersettings.php file ???

    All I want to show that geoplugin dropdown button somewhere else on the site, I can show that dropdown button but only problem saving the option :(

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking