Title: scamrwordpressadmin's Replies | WordPress.org

---

# scamrwordpressadmin

  [  ](https://wordpress.org/support/users/scamrwordpressadmin/)

 *   [Profile](https://wordpress.org/support/users/scamrwordpressadmin/)
 *   [Topics Started](https://wordpress.org/support/users/scamrwordpressadmin/topics/)
 *   [Replies Created](https://wordpress.org/support/users/scamrwordpressadmin/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/scamrwordpressadmin/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/scamrwordpressadmin/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/scamrwordpressadmin/engagements/)
 *   [Favorites](https://wordpress.org/support/users/scamrwordpressadmin/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)

1 [2](https://wordpress.org/support/users/scamrwordpressadmin/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scamrwordpressadmin/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/scamrwordpressadmin/replies/page/2/?output_format=md)

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Connecting to OpenVMS on VAX](https://wordpress.org/support/topic/connecting-to-openvms-on-vax/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/connecting-to-openvms-on-vax/#post-16257346)
 * Thank you! I will find out if OpenVMS can do so.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] How to Pull Data from Individual Tablepress Table Cells](https://wordpress.org/support/topic/how-to-pull-data-from-individual-tablepress-table-cells/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/how-to-pull-data-from-individual-tablepress-table-cells/#post-9546698)
 * Hi Tobias,
 * I was wondering about that – so thanks for the push that direction. I wrote a
   function which will now pull a variable directly from a table cell, using your
   TablePress Extension shortcode. Works like a charm!
 * For others who might run into this, here is what I did. I suspect there are more
   elegant solutions out there, but this works for me.
 * Create a function that first finds the tablepress ID for the table I want to 
   reference.
    Then, create a string that represents the shortcode to be run, adding
   in the tablepress ID in the midst, and return that value.
 * Lastly, create a variable that is assigned this new shortcode string. Use the
   variable where the shortcode would be used.
 * function nameofthishike_get_var()
    { global $my_nameofthishike_var; $my_tablecellid_var
   =tablepressid_get_var(); $my_hike_shortcode_var=sprintf(“[table-cell id=”.$my_tablecellid_var.”
   cell=H2/]”); $my_nameofthishike_var=sprintf($my_hike_shortcode_var); return $
   my_nameofthishike_var; }
 * <?php $nameofthishike=nameofthishike_get_var();?>
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] How to Pull Data from Individual Tablepress Table Cells](https://wordpress.org/support/topic/how-to-pull-data-from-individual-tablepress-table-cells/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/how-to-pull-data-from-individual-tablepress-table-cells/#post-9545781)
 * Hi.
    The TablePress extension pulls the data out just great!
 * I could use some pointers however. I would like to be able to send in the ID 
   as a variable, so that I can reuse the shortcode on different event pages.
 * ie: [table-cell id=xx cell=H2 /], where the xx would be sent in depending upon
   the table I need to reference.
 * Thanks in advance for the pointers. I’ve been slogging through support forums
   all day, and just keep finding things that don’t seem to work.
 * Regards,
 * Kathy
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TablePress - Tables in WordPress made easy] How to Pull Data from Individual Tablepress Table Cells](https://wordpress.org/support/topic/how-to-pull-data-from-individual-tablepress-table-cells/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/how-to-pull-data-from-individual-tablepress-table-cells/#post-9543020)
 * In researching this further, I ran across your Tablepress Extension for accessing
   individual table cells. I will play with that a bit, and update this thread with
   the results.
 *  Extension can be found here: [https://tablepress.org/extensions/table-cell-shortcode/](https://tablepress.org/extensions/table-cell-shortcode/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] Can dropdown selection choice set secondary input field values?](https://wordpress.org/support/topic/can-dropdown-selection-choice-set-secondary-input-field-values/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/can-dropdown-selection-choice-set-secondary-input-field-values/#post-8244081)
 * Thanks Michael,
 * Your pointer was very useful and helped me create a dropdown menu choice for 
   the contact form.
 * As always, your help is extremely appreciated.
 * Cheers
 * Kathy
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] CF7 menu with pipes – Mail TO: hs syntax error](https://wordpress.org/support/topic/cf7-menu-with-pipes-mail-to-hs-syntax-error/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/cf7-menu-with-pipes-mail-to-hs-syntax-error/#post-8186598)
 * Deleted everything in the TO: field on the mail form, and then retyped it back
   in. Now all works fine. Not sure what is different, but it’s working, so closing
   this one out.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [If Field A exists, THEN If Field B exists, we have duplicate entry](https://wordpress.org/support/topic/how-to-if-field-a-exists-then-if-field-b-exists-we-have-duplicate-entry/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-to-if-field-a-exists-then-if-field-b-exists-we-have-duplicate-entry/#post-8186258)
 * [@bcworkz](https://wordpress.org/support/users/bcworkz/) – Thanks So Much!! for
   all of the great info. Lots to learn – but it’ll be fun pulling it all together.
   I appreciate all the time you spent in your reply. Have a great day.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to stop address line at top of page from printing](https://wordpress.org/support/topic/how-to-stop-address-line-at-top-of-page-from-printing/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-to-stop-address-line-at-top-of-page-from-printing/#post-8182219)
 * [@dartiss](https://wordpress.org/support/users/dartiss/) – Thank You so much!
   That was it. I appreciate your response and the link as well. Have a great day!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [If Field A exists, THEN If Field B exists, we have duplicate entry](https://wordpress.org/support/topic/how-to-if-field-a-exists-then-if-field-b-exists-we-have-duplicate-entry/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-to-if-field-a-exists-then-if-field-b-exists-we-have-duplicate-entry/#post-7709964)
 * Hi bcworkz,
 * Thank so much for all the input/advice.
 * You are so right about user input and data consistency. Right now, the user selects
   the hike name via a drop-down. However, the full text string is stored, I didn’t
   use an ID. I really like that idea! The user Name, email and phone # all are 
   auto populated because the user has to be logged in, in order to sign up for 
   a hike. So I at least started on the right track. 🙂
 * The sign-up form is created with the Contact Form 7 plug-in. I’ll have to see
   if/how I can add sub-filters (for large #s of hikes), and how I would do the 
   hidden fields when a hike is chosen. There are several pieces of data I’d like
   to populate the table with based upon the hike choice – so I can query on them
   later – as you pointed out!
 * I really like your idea of popping up a dialog box when the drop-down selection
   changes, IF the user had previously signed up for that hike. Much better user
   experience. Looks like I’ll be learning Ajax.
 * Altering the db schema isn’t an issue – better to get it right *before* the data
   starts getting loaded and the db used!
 * Again, many thanks. Looks like I have lots to learn – so I’d best get started.
   If you have any reference materials on these topics that you have found useful,
   and you wouldn’t mind – would you shoot me over the link/names of them. Might
   save me time vs digging through non-useful materials.
 * Cheers and have a great week.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Can you use conditional statements in contact form](https://wordpress.org/support/topic/can-you-use-conditional-statements-in-contact-form/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/can-you-use-conditional-statements-in-contact-form/#post-7699005)
 * Has anyone tried this?
    I’d like to auto populate some fields in the contact 
   form, based upon how the user answers a question. Is this possible?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] Recommendation: one form name vs multiple forms](https://wordpress.org/support/topic/recommendation-one-form-name-vs-multiple-forms/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/recommendation-one-form-name-vs-multiple-forms/#post-7693303)
 * Thanks Michael! Work using (B) is underway!
 * I currently have 2 forms, one the user interacts with, selecting the event name
   via dropdown, and then the user’s name, phone, email are auto populated from 
   their login. Behind the scenes (user can’t see) I have a second form with the
   event name and event particulars pre-populated. This is because I want the user
   to just select the event name from drop-down and then have the event date, and
   other particulars auto populate when a query is run. I don’t want to rely on 
   the user to enter that info correctly.
 * I set up a query using `[cfdb-table form="form1,form2"]`, and when I query on
   an event, I do get the info from both tables. The only problem is that the results
   are on two separate rows in the query results table, each displaying that form’s
   particular info. Is there a way to combine the info from both tables into one
   line?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] How to pass variables into shortcode](https://wordpress.org/support/topic/plugin-contact-form-db-how-to-pass-variables-into-shortcode/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/plugin-contact-form-db-how-to-pass-variables-into-shortcode/#post-7533447)
 * That worked like a charm! Thanks so much!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] How to pass variables into shortcode](https://wordpress.org/support/topic/plugin-contact-form-db-how-to-pass-variables-into-shortcode/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/plugin-contact-form-db-how-to-pass-variables-into-shortcode/#post-7533413)
 * I have the Advanced Custom Fields plug in, and have defined my fields there. 
   The field shows up on the Event form when I create an event, and I can fill in
   the form name there. Then, in single-event.php, I do:
 *     ```
       <?php $cfdbformname=get_field("sign_up_custom_form_name");?>'
   
       then I have tried a couple of things.  1) just calling it outright:
       '
       [cfdb-table form=$cfdbformname class="hikersgoingclass" ..etc
       ```
   
 * and 2) creating a variable with the shortcode, and calling that:
    `<?php $cfdbtableshortcode
   = '[cfdb-table form=$cfdbformname class="hikersgoingclass"` .. etc `<?php echo
   do_shortcode($cfdbtableshortcode);?>`
 * I must admit I’m not sure where/when to use single vs double quotes, so I might
   have those wrong.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form DB] How to pass variables into shortcode](https://wordpress.org/support/topic/plugin-contact-form-db-how-to-pass-variables-into-shortcode/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/plugin-contact-form-db-how-to-pass-variables-into-shortcode/#post-7533401)
 * Hi Michael. Sorry that I wasn’t more clear.
 * You are correct, I can use the $_GET for example, to fill the variable.
 * So, for example, my variable is $cfdbformname. The value is “San Tan – Moonlight
   Trail (Short) – 2 Nov 2016”
 * I call the shortcode like this:
    `[cfdb-table form=$cfdbformname class="hikersgoingclass"`…
   etc
 * But when the shortcode runs, it sees the form variable as $cfdbformname and not
   the actual value of the variable, like this:
 * `[cfdb-table form=$cfdbformname class="hikersgoingclass"` …etc instead of
 * `[cfdb-table form="San Tan - Moonlight Trail (Short) - 2 Nov 2016" class="hikersgoingclass"`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Events Calendar Pro] How to use multiple event templates](https://wordpress.org/support/topic/plugin-events-calendar-pro-how-to-use-multiple-event-templates/)
 *  Thread Starter [scamrwordpressadmin](https://wordpress.org/support/users/scamrwordpressadmin/)
 * (@scamrwordpressadmin)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/plugin-events-calendar-pro-how-to-use-multiple-event-templates/#post-7514000)
 * RESOLVED:
 * 1. Using the Advanced Custom Fields Plug-In, I created a custom field called 
   is-there-a-hike. This has a field type of Select, and the options are 1 : YES
   and 0 : NO. The default value is set to 1 (yes), so I only have to change it 
   in the no hike scenarios. Then in the Location section for this custom field (
   still in the ACF custom field), the “Show this field group if” is set as “Post
   Type is equal to tribe_events”. This way this custom field ONLY shows up if I
   am creating a calendar event – but it won’t show for any regular page or post
   work.
 * I set the Order No (under options right below the Location box) to 0 – so that
   it will be the first custom field to show for an event. That way, if there is
   no hike, I can select no on that field and be done quickly.
 * 2. In my custom single-event.php file. This is stored in my child theme in a 
   folder called tribe-events. DO NOT modify the original Tribe-events file.
 * Create a IF/THEN loop so that IF the is_there_a_hike custom field is set to 1(
   YES), the information shows, and IF the variable is set to 0 (NO) then the info
   is hidden.
 *     ```
       <!--  SHOW CONTENT ONLY IF THERE IS A HIKE -->
       <?php $ishike=get_field("is_there_a_hike")?>    <!-- get value from custom field -->  
   
       <?php if ($ishike == 1) {?> 
   
             <!-- stuff you want to show when there is a hike (variable is set to 1 (yes)) goes here -->
   
       <?php } ; ?>
       <!-- END IF, SHOW SECTION ONLY IF HIKE THAT DAY -->
       ```
   
 * I’m sure there are more glamorous ways to do this, but it works pretty slick.

Viewing 15 replies - 1 through 15 (of 32 total)

1 [2](https://wordpress.org/support/users/scamrwordpressadmin/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/scamrwordpressadmin/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/scamrwordpressadmin/replies/page/2/?output_format=md)