Hi
We have few files that can be downloaded from the website. We would to registered user information (email , company…) before to download one of these files to keep track of “ who has downloaded and what”
We would to avoid the user will enter again the data if he/she wants to download again the same file or other files.
It is possible to do it in Chronoforms?
Do you have a sample ?
Let me know if it is not clear
thank you
(Chronoform 5 - Joomla 3.7)
Hi
any answer?
I'm still waiting
It is urgent
Thanks
Hi giulia72,
To do this you need to have some way of identifying the user when they return, the simplest way to do that is to require them to register on the site. You can then save the extra information - company, etc. to a new database table linked to their user id.
Then create your download form - I would probably create a list of files using check-boxes - and make the form for registered users only (or for a particular user group if you prefer). When the form submits you can save a record of the user_id, the date and file(s) downloaded.
Bob
ok thank you it seem a logical solution.
I will give a look
Hi Bob
we have decided to registers the user in the website.
Before to create download form, I would use demo_joomla user registration form to register user but I would to add the Company name field and also save the data in db table.
If I'm not wrong I have to add the company field and also add db save function in the setup configuration. could you confirm?
Thank you
Hi giulia72,
That sounds good, create a new table with these columns: cf_id (the Primary Key), user_id and company_name then you can add a new record there once the registration is done.
Bob
Hi Bob
I have created the table following the instruction of video http://www.chronoengine.com/faqs/2613-how-do-i-save-form-data-to-a-database-table.html
I have also added the db save action in setup form configuration.
If I register a new user, no data are saved in the table I have created.
Also if I delete the user I have just registered and I try to register again(I'm doing test for the moment), I receive the error message: Error 1063 - Duplicate entry '0' for key 'PRIMARY'
Why?
What is wrong?
Could you help me?
Hi giulia72 ,
Please drag a Debugger action into the On Submit event, then submit the form and then copy and paste the debug results here.
Bob
Hi Bob
I have activate debuger action but nothing changes: I receive the same error message and no debug message
Also, I see the user is in anycase registered in Joomla
Hi giulia72 ,
If you have a ReDirect action in your form please drag the Debugger action and a Show Stopper action before the ReDirect action - hopefully that will let you see the Debugger output.
Bob
Hi Bob
I don't have any redirect action
I have just copied the demo joomla registration form and added the db save button (for user details company) and captha code
I don't know if it could help:
if I disable db save action , it works
I guess there is something in the table where I want to save the data of user with company name
Any idea?
just for test :
if I fill manually my user detail table
cf_id
user_id
company
leaving cf_id empty, I receive myswl error message: #1062 - Duplicate entry '0' for key 'PRIMARY'
what is wrong in my table?
Cf_id is primary key as you suggested
other test I did:
I have set cf_if as auto-increment , now I don't receive anymore the duplicate key error message but the user and company name are not registered in db table, I see only the user_id.
See below the debug message. Could you help me?
Array
(
[4] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
[0] => INSERT INTO `zgrhd_user_details` (`user_id`) values ('0');
)
)
)
)
Hi Giulia,
Please try to clear the database cache in Chronoforms admin area ?
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
just done several times but it doen't work
I'm afraid there is a mistake in the db user table where I want to register the data
Resolved in different way