WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
tr ID set same as td ID (21 posts)

  1. dekzgimutao
    Member
    Posted 5 months ago #

    Hi,

    First of all, This plugin is very great.

    I would like to ask if how could we echo an ID to the TR for each field using the same ID inside the TD, Please see the sample below:

    <tr class="text-line">
    
              <th>First Name</th>
    
              <td id="pdb-first_name">
    
                <input type="text" name="first_name" class="required-field regular-text"   value="" />
    
              </td>
    
            </tr>

    Inside that <td id="pdb-first_name"> there's an ID available, how could we also use the same id above the tr <tr class="text-line"> we would like to make it is we could edit the function and jquery behaviour of each field. SO in result we would like it to result in below code:

    <tr class="text-line" id="pdb-first_name">
    
              <th>First Name</th>
    
              <td id="pdb-first_name">
    
                <input type="text" name="first_name" class="required-field regular-text"   value="" />
    
              </td>
    
            </tr>

    Thanks, Looking forward for your response.

    http://wordpress.org/plugins/participants-database/

  2. dekzgimutao
    Member
    Posted 5 months ago #

    Hello,

    Just an update I have find a solution by making this line on default signup file:

    <tr class="<?php $this->field->print_element_class() ?>" id="<?php $this->field->print_element_id() ?>">

    Would this be good?

    Also can I ask how can I hide empty fields on sigle page for example here:

    yoursite.com/participant-information-single-page/?pdb=2

    There are fields for example that are not required. How could I only show the fields with values and been filled up? Also is it possible to add columns for viewing single pages of participants info? right now it only has 2 column. First column was for title and 2nd was the values.

    Thanks

  3. xnau
    Member
    Plugin Author

    Posted 5 months ago #

    You cannot have two elements with the same ID. It will break your javascript. You must take the id out of the td if you want it in the tr. Anyway, with jQuery, you don't need to move the ID, you can just reference your tr with $('#id').closest('tr')

    If you want to hide empty fields the best way is to alter the template so that as it's looping through the values, it skips to the next loop if the value is empty.

    Yes, of course it's possible to place the data for a single record display into more columns, there are several ways to do it, but perhaps the easiest is to use CSS to float or inline the dl elements. Another approach would be to alter the template to lay the data out into columns instead of a single vertical column.

  4. dekzgimutao
    Member
    Posted 5 months ago #

    Thanks for the response xnau,

    I'll take note of the jquery.

    Which file do I alter and not show empty fields if it has no value? Could I have a sample for it?

    Ok, once we are than with the entire fields I'll be proceeding, we are building more than fourthy custom fileds, so if it would show all rows in single page of the participant even if it has empty fields, it would long very long.

    Thanks and God Bless

  5. dekzgimutao
    Member
    Posted 5 months ago #

    Also I've seen the pdb-single-default.php, and it mentioned on the description that the array could exclude name fields, but how would it be possible to exclude only the name fields which has empty fields? This would be really a great help Xnau.

    Thanks and God Bless

  6. xnau
    Member
    Plugin Author

    Posted 5 months ago #

    In your single template, right after the line that has $this->the_field(), add something like this:

    if (empty($this->field->value)) continue;

    You were on the right track...this is doing the same thing as the line that checks the $exclude array, only it's looking at the field value.

  7. dekzgimutao
    Member
    Posted 5 months ago #

    Wow thanks Xnau, great explanation! I've added the code if (empty($this->field->value)) continue; and it did worked perfectly. Thank you very much!

    Would this also be possible on exporting the csv data?

    Also I've seen a previous query about search function, could this be available on front end? Link displaying records and have search functionality above it? This would really be so much a great feature or I'm just missing something? how could I build custom function? Could I have a sample? For example only a single search field then it could simple look inside the database with names "social_security_number" and "Last_Name" once records related to search was found it would display the list like the list visible on admins list of participant page.

    Also on alternate option, is it possible to display the admin List participant page to front end? (http://yoursite.com/wp-admin/admin.php?page=participants-database-list_participants). This would also be a great feature, does it have shortcode so it could be displayed?

    Thanks Again, great and very powerful Plugin xnau.

    Thanks and God Bless

  8. xnau
    Member
    Plugin Author

    Posted 5 months ago #

    You can enable a simple search function in the shortcode: [pdb_list search=true]

  9. dekzgimutao
    Member
    Posted 5 months ago #

    Wow, Big Thanks!

    can I ask if there is also a short code where I could put advance search like the advance search in the admin panel?

    Also, is there any changelog available on your next release? could I ask if how to enable the file upload option? Could I upgrade the plugin manually by transferring files that are changed and newly added (if any) could I ask what files are changed? This is really a perfect plugin that could be used entirely flexible with more than I can think of.

    Thanks again Xnau!

    Thanks and God Bless

  10. xnau
    Member
    Plugin Author

    Posted 5 months ago #

    Yeah, I'm sorry, the search is very simple. For something more than that, custom code will be needed.

    If you want to try out the beta version, you should read the "call for beta testers" post at the top of the forum. Don't try to upload files, it won't work, you have to do the whole install.

  11. dekzgimutao
    Member
    Posted 5 months ago #

    Thanks Xnau,

    When would be the next version would be release? Would it be available automatically on the admin panel update once it is released? Can I ask which file do handle the fields being generated? Would it be possible if I change the current image upload to any file, just removing any paramaters that only accept image files? Would it be simple?

    Thanks and God Bless

  12. xnau
    Member
    Plugin Author

    Posted 5 months ago #

    What you'll find in the new release is a new field type that can accept any type of file as an upload. I'm working on the new release and it is very close. You will be notified in the admin when it is available.

  13. dekzgimutao
    Member
    Posted 5 months ago #

    Thanks Xnau,

    Looking forward for it Xnau.

    At moment can I know which file handle the fields? espcially the image upload field. Just want to know if where I could see the core code for the file and what I can do for the moment as were now on a production site.

    Thanks and God Bless

  14. xnau
    Member
    Plugin Author

    Posted 5 months ago #

    Yes, you won't be able to do it that way, you have to update the whole plugin all at once because the changes are all over the place, not just in one file.

    I recommend you set up a developments site and test the beta.

  15. dekzgimutao
    Member
    Posted 4 months ago #

    Thanks for the advice Xnau,

    I've tested the current beta version and received an header error upon signing up with the fields created through participants database, but when I refreshed all seems working well, I don't know if it was just on my wordpress or it would be on the plugin. I'll try it on another fresh install.

    Also can I ask Xnau, if all fields being generated was just for fields? On the next update does it have add button instead of just fields? Also it would be great if we could group the fields, just an idea.

    Looking forward for the next version. I'll be testing the beta version again.

    Thanks and God Bless

  16. xnau
    Member
    Plugin Author

    Posted 4 months ago #

    The beta version is the next version, so it won't be any different just some bugs fixed.

    Fields are grouped, go to the Manage Database Fields page and look for the "Field Groups" tab, you'll see the groups that have been defined, you can define your own if you want. Each field is assigned to a group.

  17. dekzgimutao
    Member
    Posted 4 months ago #

    Thanks Xnau,

    I saw it, but when I check the source code generated for each group, it doesnt have separate div? For example on Main and Personal Groups, It would be much easier to handle if they are also grouped by divs id so calling all fields at a single div id is much convenient or is it already group on divs? I've check the code and just shows the default class

    <div class="wrap pdb-signup pdb-signup" >

    Same with some other groups. And also the table class has same class value.

    Thanks and God Bless

  18. xnau
    Member
    Plugin Author

    Posted 4 months ago #

    First, you have to have the "show groups and group descriptions" setting set under the signup form tab. Now, the groups will be shown, but they are just rows in a table. If you want to divide the form up into separate HTML units, you'll need to alter the pdb-signup-default.php template so that with each loop of the groups, you are starting a new table.

  19. dekzgimutao
    Member
    Posted 4 months ago #

    Thanks Xnau,

    Would this be complicated? Can I ask how could this possibly done on the pdb-signup-default.php ?

    By the way, the beta version looks so promising with the features you have added. Congrats!

    Thanks and God Bless

  20. xnau
    Member
    Plugin Author

    Posted 4 months ago #

    Maybe a little complicated, but depending on what you want it to look like, you could just do it with CSS. That would be a lot simpler. Did you try turning on the groups to see how it looks?

  21. dekzgimutao
    Member
    Posted 4 months ago #

    Thanks Xnau,

    Yes I've turn the groups on, but on the sign up page, both groups are just combined together, in the single pdb page it looks great as they have their own title groups, But on the signup page they are on a same table and on single pdb page their are separated with their own divs <div class="section" id="pdb-personal"> , <div class="section" id="pdb-main"> on pdb single their are on the same table.

    What do I wan to achieved is to hide their group all at once, for example I have 200 Fields and I have divided them on 13 steps. At current state, I have made step on visible until step two is selected, but I made this one by one using jquery and calling each field for each step, is it possible to call them by group so instead of calling them one by one trough jquery I can call them per group? for example on single page I can simple hide each group as they are separated by their own div id.

    Also, can I ask xnau when could be the possible release of the 1.5 version? Thanks again! this is really a strong and powerful plugin.

    Thanks and God Bless

Reply

You must log in to post.

About this Plugin

About this Topic

Tags