• Hi!

    Really liking the plugin so far. I hope you can help me solve this last piece of the puzzle. Let me tell you what I wish to accomplish;

    We have a call campaign we’re starting with a list of offices. These offices have a unique ID number associates with them, along with a business name, state and telephone number. We’d like to collect some additional info on these offices for the database.

    I’ve uploaded a CSV with out list of offices/IDs/States/Phones etc. The import was successfully and I can browse the list of participants.

    What I’d like to be able to do is give the caller a office ID number, once that is entered I would like to auto-display the office name, state and telephone number. – Then they have the info they need to proceed with the phone call, where they get the additional information, then submit the record to update the database.

    Is this possible? I’m pretty familiar with WP and good enough with PHP to be dangerous.

    So to reiterate, the workflow would be like this:

    Load form page
    Enter Office ID
    See Office name and phone number which is already part of the database
    Make phonecall
    Fill out 4 or 5 additional fields
    Save to DB

    The users would be in house and not necessarily visitors to the site. Thanks! Let me know if there’s anything that can be done.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Ok, to do this on the frontend, you’ll need to use a custom template on the “list” shortcode. Take a look at this article, it explains how to show a single record display using a list shortcode and search so that you’ll get the basic functionality you’re looking for.

    Showing a Search Result as a Single Record

    Now, you’ll need to make a simple change to the template in the tutorial to get an editable record. Where it calls the single record shortcode, you just have to change that to the “record” shortcode:

    <?php echo do_shortcode('[pdb_record id=' . $id . ']'); ?>

    Now do something like this for your list shortcode so the search field is only acting on your Office ID:

    [pdb_list search=true suppress=true search_fields=office_id template=single]

    Be careful about controlling access to this page as it exposes your records to getting edited by anyone who has access to it.

    Thread Starter pommey

    (@pommey)

    Awesome! I was just finding this in the blog article as you were replying. Working just like I wanted it to. Thank you! (I’m going to password protect the page, but for now i just have it no-index, no follow).

    Thank you for the quick response! so rare. I may have another question or 2 before I finish up here.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Displaying Database Fields After Entering Matching ID’ is closed to new replies.