Change the custom fields with dropdown in signup page
Posted: 2017-05-04 08:51
Hello,
Here I am trying to change the fields in signup page from input text field into a dropdown menu that is filled with the data from inside my own database.
Tried using it much like the groupID but to no avail because the name and id for the dropdown is not for custom fields but for the data from my database.
Here's what I've done so far
This is from the appgini code which lets you to choose the group
This is what I modified to get the data from inside my database
Any kind of help is gracefully accepted because the dropdown is a success but the data itself is not saved by the server because the dropdown class and id is not custom2 but instead Kod_Negeri. I would like to make the dropdown to be for custom2 but as of now to no avail.
Here I am trying to change the fields in signup page from input text field into a dropdown menu that is filled with the data from inside my own database.
Tried using it much like the groupID but to no avail because the name and id for the dropdown is not for custom fields but for the data from my database.
Here's what I've done so far
This is from the appgini code which lets you to choose the group
Code: Select all
$groupsDropDown = preg_replace('/<option.*?value="".*?><\/option>/i', '', htmlSQLSelect('groupID', "select groupID, concat(name, if(needsApproval=1, ' *', ' ')) from membership_groups where allowSignup=1 order by name", ($cg == 1 ? sqlValue("select groupID from membership_groups where allowSignup=1 order by name limit 1") : 0 )));
$groupsDropDown = str_replace('<select ', '<select class="form-control" ', $groupsDropDown);
Code: Select all
$NegeriDropDown = preg_replace('/<option.*?value="".*?><\/option>/i', '', htmlSQLSelect('Kod_Negeri', "select Kod_Negeri, concat(Nama_Negeri) from ruj_negeri order by Kod_Negeri", ($cg == 1 ? sqlValue("select Kod_Negeri from ruj_negeri order by Kod_Negeri limit 1") : 0 )));
$NegeriDropDown = str_replace('<select ', '<select class="form-control" ', $NegeriDropDown);