Hi,
I administer a Joomla website for an organisation that has membership subscriptions. Some columns have been added to the #_users table to hold data for each member.
A chronoforms form is used to create new members. The "Joomla User Registration" option in the onSubmit event is used to create the user and to save the additional fields to the database.
This all works fine when a new member creates an account. However, there is some issue when the member administrator is logged in herself and wants to create an account using the form. Most of the fields from the #_users table are present in the form, but the #_users table holds has some additional field that are not present in the form but that are used later on in the separate member administration system. When submitting the form, the values of all fields from the form are saved correctly in the database. But for the database columns not present in the form, the value of the currently logged in user is saved... which obviously doesn't make sense.
It seems that all values from a record in the #_users table are loaded after login, and that they are saved together with the form data as they hold the same name.
To avoid this issue, I was thinking to include a hidden field in the form (with empty value) for each database column that is not present in the form, but maybe there is a more elegant solution?
I administer a Joomla website for an organisation that has membership subscriptions. Some columns have been added to the #_users table to hold data for each member.
A chronoforms form is used to create new members. The "Joomla User Registration" option in the onSubmit event is used to create the user and to save the additional fields to the database.
This all works fine when a new member creates an account. However, there is some issue when the member administrator is logged in herself and wants to create an account using the form. Most of the fields from the #_users table are present in the form, but the #_users table holds has some additional field that are not present in the form but that are used later on in the separate member administration system. When submitting the form, the values of all fields from the form are saved correctly in the database. But for the database columns not present in the form, the value of the currently logged in user is saved... which obviously doesn't make sense.
It seems that all values from a record in the #_users table are loaded after login, and that they are saved together with the form data as they hold the same name.
To avoid this issue, I was thinking to include a hidden field in the form (with empty value) for each database column that is not present in the form, but maybe there is a more elegant solution?