Participants Database 1.5 WordPress Plugin

what’s new in 1.5

There’s lots of improvements under the hood, and a list of new and better user features too:

Plugin Overview

This WordPress plugin is for the purpose of creating a database for use in a WordPress site. It is primarily intended as a way to manage information pertaining to people such as the members of a club or team, volunteers, students, anything like that. It gives you the ability to allow people to create and edit their own record while additional information can be managed by administrators or managers. The plugin may also be used as the basis for an index, directory or catalog.

>> Quick Setup Guide

The database is made up of fields, and each field may be one of several types that are uniquely suited to store a particular kind of information. These fields can also be divided into groups to help organize the information. Fields can also be provided with help text to assist users in providing the information.

Please read the documentation fully, as this is a complex plugin that can be used in a lot of different ways.

I have created a page that gives a step-by-step method for setting up a typical application of the plugin. I suggest you begin with that, it will help you understand how the plugin works and also give you a working baseline so you know the plugin works on your site. You can make your modifications to the plugin functionality from there.

Next… Using The Participants Database Plugin

2,246 comments

I am running version 1.5.4.9. It has been awhile since I have tried to upload a .csv file, but that feature isn’t working for me today. Is that a known issue or something that is only not working on my instance?
Thanks.

by Kate Russell on July 23, 2014 at 8:21 am. Reply #

Hi Kate,

CSV uploads are working. It can be a little tricky, however. It’s necessary to make sure the CSV is in the correct format and is well-formed. If you continue to have trouble with it, post the details and I’ll try to help.

by Roland on July 23, 2014 at 8:39 am. Reply #

Is there a way to duplicate fields and or field groups when developing the form? It would be very helpful, as I have multiple parts that are similar.

Thanks,
Bob

by Robert Wilkins on July 23, 2014 at 3:23 am. Reply #

Bob,

You can if you’re good with MySQL queries, or you use a database management app that can duplicate columns or rows. That’s really the only way. Just remember that each field defined must have a matching column in the main database.

by Roland on July 23, 2014 at 8:38 am. Reply #

Roland you are such a genius! Thank you so much for your help. I had the wrong shortcode for my subsequent pages and that fixed it.

I was using the “pdb_signup” shortcode on each page, so of course, it recorded each time I hit the submit button!

Another problem fixed! thanks so much…

by Robert Wilkins on July 22, 2014 at 7:16 pm. Reply #

Roland,
Thank you very much! I completely forgot about Yahrzeits. What Great Service! Now we can proceed with completing our site and go live. Your program is wonderful.
Rod

by Rod on July 22, 2014 at 8:04 am. Reply #

Hi Roland,
I entered you as username xnau with password Roland on my site at http://www.chstx.org/wp. You will have full access to everything once logged in to the site.
Thanks,
Rod

by Rod on July 22, 2014 at 12:43 am. Reply #

Rod,

OK, I fixed it, and discovered a bug. What is happening is there are several fields with the title “Last Name” In the setting, only the last defined field with that title is shown (because it only shows unique names in that dropdown)…so when the settings were saved, it was setting the “single record link field” to the wrong field. The reason it seemed to happen unexpectedly is because the problem wouldn’t crop up until the settings were saved again.

The workaround is to explicitly name the single record link field in the shortcode so it’s not using the setting value. I took the liberty of putting that into the shortcode for you so you won’t have to worry that saving your plugin settings again will break something.

by Roland on July 22, 2014 at 7:54 am. Reply #

Hi Roland,
I added the last_name as a clickable link to each record in my list that, when clicked, takes the user to all the details contained in a record. After loading some participants it worked great. Then I input additional participants and it quit working. I have checked the settings and they are set to last_name and the [pdb_single] page. What else could cause this problem? I need help!
Thanks,
Rod

by Rod on July 21, 2014 at 5:39 am. Reply #

Rod,

Can you share a link so I can see it in action?

by Roland on July 21, 2014 at 5:30 pm. Reply #

Hi, Roland,

Could you advise if I am wrong that the plugin does not support for multiple concurrent “write” access to the database data? Is it difficult to add this support?

Thanks a lot!

Melody

by Melody on July 20, 2014 at 9:30 pm. Reply #

Hi, Roland,

I want to backup all database records entered with Participant-Database in a spreadsheet (e.g., csv file) from frontend page or cron job. Is there a shortcode or function in your plugin that I can use to do this?

Thanks a lot!

Melody

by Melody on July 20, 2014 at 9:50 pm. Reply #

Hi Melody,

The ability to handle multiple concurrent writes to the database is not related to WordPress or WP plugins, it has to do with the configuration and capacity of the database server. If you are seeing multiple instances of database writes not occurring, you should contact your web host and ask them to help you solve the problem.

I don’t have a single function that will perform a database SQL or CSV dump, but it’s easy enough to set up a cron job to act directly on the database. It may be even simpler to use a WP backup plugin (such as BackWPUp) that can be configured to backup specific tables from the WP database.

by Roland on July 20, 2014 at 10:55 pm. Reply #

Hi Roland,

I’ve created a template file based on the [pdb_list] template for just showing one field in the dropdown to search on, however I would like to create a new shortcode for it and am having a lot of trouble trying to do this. I’ve tried using [pdb_list template=single] -> pdb-list-detailed_single_field.php on the page, but it just isn’t working, could you tell me how to do this please?

Thanks.

by Tim on July 18, 2014 at 6:24 am. Reply #

Read my article on creating custom templates, it explains how to name your templates and call them in your shortcode:

How to Create Custom Templates

by Roland on July 18, 2014 at 7:30 am. Reply #

Hi,

Excellent plugin, thank you. Is there a way in the database fields to set up a two part question? For example I’m asking volunteers what languages they speak: Spanish, Vietnamese, Other (this part is no problem) I also want to ask if they can Write, Speak, Read, or All of the above for each of the languages they select. Here’s a link to what I mean (about 1/3rd of the way down the page):
http://www.sanrafaelvolunteers.org/application_sign_up_form.aspx

Thanks for any suggestions you may have.
-Jason

by Jason Roberts on July 16, 2014 at 1:24 pm. Reply #

Jason,

The hard part will be getting the layout to work, but if you’re good with CSS it’s possible. The idea is you create 4 fields: 1 multiselect/other for the language, then 3 radio (or multiselect) one for each language and “other.” Then you line up the 3 radio selectors with the corresponding language choice.

The radio selectors would be named something like “english_ability” “vietnamese_ability” “other_ability” then they would all have values of “read,speak,write,all” In your CSS you’d hide the titles for these fields.

It would be easy to add more languages. I hope my explanation makes sense.

by Roland on July 16, 2014 at 1:38 pm. Reply #

Roland, this is such an amazing plugin! It has so many uses, I’m always astonished when I discover another application for it.

I’m creating a multi-page form and have 2 questions regarding this.
You suggested that people can use their browser back and browser forward buttons to navigate through the various form pages, but I’d like to use a more elegant solution. I guess I could create text links and place somewhere on the page and stylize with CSS, but do you have any other suggestions?
Secondly, is there any way that people could preview their choices/selections before they do the final submit?

Thanks again!
Bob

by Robert Wilkins on July 16, 2014 at 9:41 am. Reply #

Hi Robert,

Yes, back links are possible, you’d just use the standard “history(-1)” link. You’ll have to look up the details on how that is done.

As to the preview…the only way to do this is to set up the last form page to include everything that was on the previous pages. That would give them a chance to change things they’d entered before. Remember that each form page is saved when moving on to the next page, so if they decide they don’t want to submit the info, it will have been saved anyway.

I will warn you that the current version of the plugin is a little buggy with going back. For instance, if there is a validation error on a page that is corrected and submitted, then if you go back to that page, the error is shown again. This is mostly in the Firefox browser, it’s due to browser caching. In the next release, I override browser caching so the back button works perfectly.

by Roland on July 16, 2014 at 1:44 pm. Reply #

Roland, thanks for your reply in regards to the multi-page forms. I’ve discovered that it’s not behaving the way I had anticipated. That’s probably my misunderstanding the purpose.

It looks like every time the “submit” button is clicked to advance to the next page, a new record entry is recorded, so my “list participants ” dashboard will be exceptionally longer than if it recorded only once when the final submit button action goes to the “thanks” page.

So, I have 3 field groups and my original concept was to have the form a 3-part (or 3-page) form. The final record was to be a composite of all three parts. The way it seems to be recording however, won’t allow me to sort my entries properly since each field group has unique questions and I’ll have no way of matching each part with another.

Guess I should do it in one form?

by Robert Wilkins on July 17, 2014 at 9:23 am. Reply #

Robert, something is wrong, it is of course supposed to save all the form pages into the same record. It does save the form data for each page separately, but updating the same record. If it’s not doing that, then something is preventing the record ID from carrying over. This requires PHP sessions, which requires cookies. Perhaps if you try flipping the state of the “PHP Sessions” setting under the advanced tab, it will work.

by Roland on July 17, 2014 at 4:27 pm. #

Roland, my multi-page forms are still creating a unique record for each “page” of the form. I flipped the PHP sessions button but it hasn’t made a difference. The only I can think of is that I removed the “first name”, “last name” default fields from the DB in phpmyadmin, because I didn’t want them originally. I’m wondering if that has something to do with it…

by Robert Wilkins on July 22, 2014 at 10:53 am. Reply #

Well, of course it’s best to use the plugin’s delete functions rather than edit the tables directly, but if you deleted the entries from the participants_database_fields table then you should be fine. Removing them from the participants_database main table is optional, but if you did only that, it would cause problems.

Make sure only the first page of your multiple-page form is using the pdb_signup shortcode. All the rest must be pdb_record shortcodes. The final page has to be a pdb_thanks shortcode.

by Roland on July 22, 2014 at 11:05 am. #

I am switching a client to a WordPress website and I’m using Participants. Can we send an email to all members directly from the website? Or can the database be sent to Constant Contact for an email?

by Cindy Causey on July 16, 2014 at 6:56 am. Reply #

Hi Cindy,

There isn’t anything built in to the plugin to send emails to people at will. Your best bet is to export the list as a CSV, then import that into ConstantContact. While the plugin works well for collecting email addresses, is not well suited to maintaining an email list, as it provides no way to opt out.

by Roland on July 16, 2014 at 7:17 am. Reply #

When the database is exported to an .csv file, all line breaks in the database records are replaced with . So there is problem when this .csv is imported to another computer. Could we disable the conversion when exporting to .csv. Thanks

by Jason on July 11, 2014 at 4:23 pm. Reply #

Hi Jason,

The plugin exports a standard CSV with line breaks between each record, commas between each field with data enclosed by double quotes when needed. If there are any line breaks in the data, they will be enclosed, so that shouldn’t affect things. Have you tried looking at the CSV in a plain text editor?

by Roland on July 11, 2014 at 6:48 pm. Reply #

Hi Roland,

I typed three line messages in a field like:
Line #1: “note1″
Line #2: “note2″
Line #3: “note3″

When they are exported to a .csv file, it looks like:
“note1note2note3″

When this .csv file was imported to another computer, then this field showed like:
“note1note2note3″
instead of three line message:
“note1″
“note2″
“note3″

Thanks
Jason

by Jason on July 21, 2014 at 5:10 pm. Reply #

Jason,

Are you using a “text-field” form element? In my tests, data like that will export with HTML line breaks.

by Roland on July 21, 2014 at 5:48 pm. #

Hi Roland,

Unfortunately I haven’t got experience with PHP, but I’m trying to help someone out and hope you can help me.

Is it possible to make a ‘dynamic’ id-filter? I want to total two fields in a single record, but when I use the Total shortcode it adds up those fields from the complete database.

I can make it work for a specific ID e.g. pdb=204 by writing the code like this: [pdb_total fields="field_1,field_2" filter="id=204"]. This however means that pdb=317 also shows the totals from 204. It would be great if there’s a value I can use so that the id adapts to the single record being shown. Is that possible?

Best regards,
Jan

by Jan on July 10, 2014 at 9:34 pm. Reply #

Hi Jan,

Well, of course it’s not too difficult given some PHP knowledge. Possibly the simplest way to do this is to use a plugin that allows you to use PHP in your posts. Then, put something like this on your page:

[php]echo do_shortcode('[pdb_total fields="field_1,field_2" filter="id=' . $_GET['pdb'] . '"]')[/php]

This will only work on the “single record page” that has the record id in the URL as “pdb=204″ or whatever the particular record id is.

by Roland on July 11, 2014 at 7:05 am. Reply #

Hi Roland,

Thanks a lot for your answer. Unfortunately, I still can’t get it to work, the code returns nothing.

Maybe I haven’t been exact enough with telling you how the id is presented, the url is structured in the following manner: http://test.ourhost.nl/?page_id=13&pdb=608

Hopefully there’s something I can change in the PHP-code to get it to work. The PHP-plugin works as it should, I’ve tested it with server date and time.

Best regards,
Jan

by Jan on July 16, 2014 at 4:02 am. Reply #

Show me exactly what you have on the page with the PHP code. These things must be exactly right or they won’t work.

by Roland on July 16, 2014 at 7:14 am. #

Did I explain how to modify the template to total multiple fields? This is something you will have to do for your totals to be correct.

Read the section on creating custom templates, and using the “pdb-total-default.php” template as a starting point, modify the totaling code like this: on line 30, you’ll see this code:

foreach ($this->record->values as $name => $value) {
if ($name == $fields[0]) {
$total = $total + floatval($value);
}
}

that is designed to total over several records. What you want to do is total over several fields within a record, so change that code to this:

foreach ($this->record->values as $name => $value) {
foreach ($fields as $field) {
if ($name == $field) {
$total = $total + floatval($value);
}
}
}

by Roland on July 16, 2014 at 7:37 am. #

Hi Roland,

This is what I have on the page with the PHP-code. I’ve changed the pdb_total as you’ve described, but there’s still no output.

[pdb_single][insert_php]echo do_shortcode(‘[pdb_total fields="uren,uren2,uren_3" filter="id=' . $_GET['pdb'] . ‘”]’)[/insert_php]

by Jan on July 16, 2014 at 9:35 pm. #

It’s correct. You see nothing at all? What about the single record shortcode?

Anyway, I know this works, it’s just matter of getting everything right.

by Roland on July 17, 2014 at 6:55 am. #

The single record shortcode works perfectly.

Are there also other ways to achieve this? Maybe placing the dynamic id-option into a custom template or something?

by Jan on July 17, 2014 at 9:49 pm. Reply #

Yes, you can place the do_shortcode function in a WP template. That’s the best way to do it, it’s just more complicated to set up.

by Roland on July 18, 2014 at 7:28 am. #

Hi Roland,

I’ve got it working! It just needed a ‘;’ before the closing tag.

Thanks a lot, you’ve helped me make someone very happy, which makes me very happy :)

Best regards,

Jan

by Jan on July 22, 2014 at 12:58 am. #

Hi, just implemented groups to get the db doing two things ;). However, how do I get the confirmation email to the applicant to show the information relevant to their type of application? One usage is for a competition and the other is for a training course. eg The confirmation email for Training shows “Age Category:” which is from the Competition db, followed by blank space. Many thanks

by Andrew on July 9, 2014 at 5:28 am. Reply #

Hi Andrew,

Something like this is currently not possible without altering the core code.

by Roland on July 9, 2014 at 7:55 am. Reply #

Hi Roland, ok. I discovered that if a variable is blank then it is not displayed in the confirmation/notification emails so I have been careful with the descriptions of the data and managed to make it look ok. Fortunately the data for both uses I have are similar.

If the database were used for 2 or more completely different purposes then it looks like you would need to implement groups in the confirmation/notification email settings to be able to use it properly…

by Andrew on July 17, 2014 at 11:17 am. Reply #

Thanks, Andrew. It’s true some additional flexibility needs to be added to run the database for two separate kinds of application…that was never it’s purpose, so these tricks are just a way to get additional functionality out of a plugin designed for one application at a time. I don’t plan to go any further down that road, instead I have some major changes in store that will add capability without adding complexity.

by Roland on July 17, 2014 at 4:35 pm. #

How do I delete the entire current database and upload a different one?

by RM on July 8, 2014 at 4:18 pm. Reply #

I know how to upload the new one, just not sure how to delete the current one.

by RM on July 8, 2014 at 4:19 pm. Reply #

You can do this using a database tool like PHPMyAdmin. It’s also possible to use the admin list, set it to show all your records, click on “select all” then click delete.

by Roland on July 8, 2014 at 4:50 pm. Reply #

Thanks, Roland… got it!

by RM on July 9, 2014 at 6:54 pm. Reply #

How can I put the FULL SIGN-UP form on a page so that the participant can fill EVERY THING out right then and there instead of after receiving the confirmation email?

by dale on July 8, 2014 at 3:12 pm. Reply #

Any field that is in a visible group and has the “signup” checkbox set (on the manage database fields page) will appear in your signup form.

by Roland on July 8, 2014 at 4:48 pm. Reply #

Hi!
When a user register it shows in the frontpage rightaway but the link on the mail he receives don’t work. I asume this is because is not approved yet.
If it’s not approved I don’t want him to show on the page.
Can I do that?

Thanx!

by Gabriel on July 7, 2014 at 1:13 pm. Reply #

One more thing, can I put a captcha on it?

by Gabriel on July 7, 2014 at 1:16 pm. Reply #

Yes all this stuff is possible, I suggest you read the “Setup Guide” in the plugin menu for configuration instructions to get your user’s edit link working.

On the “Other Notes” page, under “Approving Records for Public Display” you’ll find instructions for setting up an approval for your records.

by Roland on July 7, 2014 at 1:54 pm. Reply #

Leave your comment

You can use these XHTML tags: <strong> <em> <code> <pre> <a href="" title=""> <img src="">

Required.

Required. Not published.

If you have one.



css.php