one that will hold the Joomla userid (foreign key) and the other will be the primary key for the additional fieldscreate 2 forms, ie the base Joomla registration form and a form with the additional fields, based on the new table. user submits the base formon success gets redirected to the second form that includes the additional user details. This form includes a value for a foreign key value, that gets passed to it from the userid that was successfully submitted in the first form.this will give me the userid in both tables, can then join them for creating a Connectivity table listing etc. Weakness with this approach is that user might close browser before 2nd form opens. But the user group is closed and I can control with messages, eg on submit but before success, advise user that new form will be opening. And if the second form fails submission then the user values are deleted from the users table and user has to redo. ​Can this be achieved with the CF setup actions etc and without editing Joomla's php (NB point 6 second sentence, and point 9)Thanks"> Joomla User With Additional Fields -- Will this Approach Work? - Forums

Forums

Joomla User With Additional Fields -- Will this Approach Work?

hangbill 21 Jan, 2019
Choronoform V6

I need to add fields to the Joomla registration, 15 or more. But I don't want to use the Joomla Fields functionality. Mainly because its table structure is vertical and I want a horizontal structure, ie create my own table with named columns. Too challenging setting up Connectivity table lists with vertical structure - needs multiple models, php editing ... .

In another post Max said "Connectivity works well and easily with horizontal tables, when a table is connected to another using a foreign key, but some tables store the data virtually, like the Joomla profile fields table for example and this makes managing the data harder."

So is the following possible?
  1. create a new table and give it a unique extension / name
  2. add the additional fields
  3. include two id fields => one that will hold the Joomla userid (foreign key) and the other will be the primary key for the additional fields
  4. create 2 forms, ie the base Joomla registration form and a form with the additional fields, based on the new table.
  5. user submits the base form
  6. on success gets redirected to the second form that includes the additional user details. This form includes a value for a foreign key value, that gets passed to it from the userid that was successfully submitted in the first form.
  7. this will give me the userid in both tables, can then join them for creating a Connectivity table listing etc.
  8. Weakness with this approach is that user might close browser before 2nd form opens. But the user group is closed and I can control with messages, eg on submit but before success, advise user that new form will be opening.
  9. And if the second form fails submission then the user values are deleted from the users table and user has to redo.

Can this be achieved with the CF setup actions etc and without editing Joomla's php (NB point 6 second sentence, and point 9)
Thanks
healyhatman 21 Jan, 2019
You can get the user id using {user:id}. So make them log in before they can access the second form. There are plugins that can redirect a user to a page - create an additional user group lets say call it "verified". Redirect all "registered" users (i.e. that haven't successfully completed the second form) to the form.

This is much easier then than using Joomla's custom fields.
hangbill 22 Jan, 2019
Excellent. I like the 2 step process, ie register then login and complete 2nd form.
Not sure how I'll get the userid into the additional fields table. It'll have a foreign key id field to hold the userid it but how to insert it?
hangbill 22 Jan, 2019
Thanks. Signing out for a few days ...
This topic is locked and no more replies can be posted.