I have altered the user registration form and have made it dynamic with some more input fields. So, I have created a separate table in drupal database to store the additional details. Now, from my newly created table I want to display 2-3 fields on the main page. I have installed views module for this purpose. Now, in the views UI, I am not able to find any option to add fields from my newly created table (created in drupal database). Is this possible? The default options of user name, picture is present but the additional details which I have added is not showing up anywhere in the views UI. Do, I have to use views API and have to write code to incorporate this feature. Please suggest any other module which can be of use for me.

Comments

nourcy’s picture

Why are you created a new table?
You can add fields to your user here : admin/config/people/accounts/fields
Then if you want to have this field in the registration process, edit your field and set "Display on user registration form."

nbie’s picture

Actually, the form that I am making is dynamic. Adding fields directly from UI doesn't give me any option to make the form dynamic. In my case for e.g. I have two radio buttons, based on the selection different field options are presented to the users. However, I am not able to find if this kind of interaction is possible in case I add fields directly from the admin UI. So, I created a separate module and put the code of this dynamic form in .module file. Through submit handler & database API, I am able to save the entered data into database. So, I created a separate table to store the additional field values.

Now I am struck and unable to use views on this table to extract the relevant information to display on the front page :(

Please let me if I have followed the right process or if there are any other alternatives to this process.

nourcy’s picture

How dynamic it is?
Because maybe you should better use hook_form_alter to fill your fields

nbie’s picture

yes, I have use hook_form_alter for adding fields in the form.

WorldFallz’s picture

You need to use the views api to expose any custom data tables to it-- see views advanced help for more info.

nbie’s picture

ok, working on it and will update asap.

nbie’s picture

lot of coding is involved, any other way around?

WorldFallz’s picture

Use one of the 'drupal ways' of extending user registrations instead of creating your own.