Forums

How to use ChronoForm 6 to download .pdf files online?

ray@Webaz18 16 Sep, 2018
Hi there,
Could you please let me know if ChronoForm6 can be used to download .pdf files online by registered members?
If yes, how to proceed?
Kind regards.
GreyHead 17 Sep, 2018
1 Likes
Hi ray,

You can use an Event Switcher, If the user is not logged in then show an error message, if they are logged in show a list of download links.

Bob
healyhatman 18 Sep, 2018
So in your event switcher for the data provider you either do {user:guest} with event choices 1, 0 (1 is guest, 0 is registered).

If you want only a certain access level to be able to do it than you need a read data action looking at the user_usergroup_map table, WHERE user_id:{user:id} and group_id:# (replace # with the id number of the access group they should be in) - if found, show the links and if noty found show the error message.

As for the content of the links, you can look at https://stackoverflow.com/questions/364946/how-to-make-pdf-file-downloadable-in-html-link

OR you can make another event, with a download action, with the filename you need passed by URL data. So your link you're showing users to click on would be <a href = "{url:download}&file=the_file_name">Some text here</a>
ray@Webaz18 18 Sep, 2018
Thanks GreyHead,
I'm new to CF6 and using the trial version.
Is Event Switcher located in Demos?
If yes, how to link products 1, 2, 3 to .pdf documents?
ray@Webaz18 18 Sep, 2018
Thanks healyhatman,
I will give that a go.
This topic is locked and no more replies can be posted.