Forum Replies Created

Viewing 15 replies - 16 through 30 (of 32 total)
  • Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Anyone out there have any ideas on this one?

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    As noted above, I installed a different theme to test the shortcode calls, and they worked fine in other themes. Then, I went back and activated the Minamaze_Pro-child theme that I had. And CRASH! The system threw fatal errors and I couldn’t get in to even swap that them out for say Twenty-Fifteen. My hosting company put back Twenty-Fifteen for me so I was up and running.

    In the end, I deleted the child theme and recreated it from scratch. (Thank goodness for file backups). I restored the child theme files and am back up and running.

    The short code calls now work the first time, and every time.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Honestly, I have no idea what could have caused the corruption, as all I did was swap out and try a different theme for testing purposes.

    To resolve, I ended up wiping the child theme out and starting from scratch. Here’s a good reason to have backups…. I recreated the child theme, added back the pertinent files and all is well again.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    I was able to create a template whereby I could pass in variables so one template can be reused for multiple hikes. (the template displays information on upcoming hiking club hikes)

    1. Using the Advanced Custom Fields 4.4.7, I created custom fields for the post.

    2. Using get_field() to pull the content of one of the custom fields, and put that into the theme. For example:
    <?php $pageid=get_field(“page_post_id”);?>
    <?php $spec_instruct = get_field(“special_instructions”,$pageid);

    if( $spec_instruct ) {
    echo($spec_instruct);
    }
    ?>

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    I tested this with other themes…
    The initial [contact-form-7 id=”123″ title=”your title”] shortcode call behaves as in the first post (only works if variable assigned inline, vs using get_field)

    However, the shortcode for [cfdb-table….] works the first time in other themes, vs only working on every second page refresh.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Note: I also need to call the shortcode [cfdb-table ….] and pass in variables…. I’m getting the same results as above, with one exception.

    If I refresh the page a second time – the table will display.
    Refresh a third time – it goes away.
    Refresh a fourth time – it comes back.

    Every other refresh it works. hmmm….

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Still haven’t found anything on how the form created for unregistering for a hike could be set so the user would automatically be removed from the back-end CFDB db.

    For now, I go in and manually remove them. Would like to automate it.

    Any ideas?

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Resolution:

    1. I just deleted the validation error text. This stops the validation error from showing up. However, if I wanted to validate against properly formed phone #s or something, I could have a problem. For now, this workaround will suffice.

    2. I had to create a unique $fieldName for each contact form (hike sign up) and then create a unique filter for each hike, using that same $fieldName. I had to duplicate each for the unsubscribe function – again with unique $fieldNames. The function names also had to be unique, as do the filter names.

    With a unique form & filter for each sign up and each unsubscribe (per hike), this works. But that’ll be upwards of 300 forms/filters for sign up and 300 forms/filters for unsubscribe in a year. Lots of coding there, and not very maintenance friendly.

    That said, the filters, when coded this way, work like a charm.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Hello,

    Just checking in to see if anyone else has run into this? It appears that in order to check for duplicate submissions by user name (some members share email so they aren’t unique), I need to do the following:

    1. Create a unique form for each hike a user might sign up for. That form must have a unique user name specific to that hike & form.
    2. Create a unique filter for each hike that searches for that unique user name created in step #1.

    We also need to allow users to unsubscribe to a hike, so I need to:

    Redo steps 1 & 2 above for the unsubscribe action, creating new filters & unique field/form/function names for each.

    We could have upwards of 300 hikes in a year – which means I’ll have 600 forms and 600 filters in a year. That’s a lot of coding! And, won’t make this site easy to hand off should someone else take over maintenance later on.

    1. What impact will all these filters have on the performance of the site?

    and more importantly

    2. Is there a better way that I should be doing this? (catching dup submissions for sign up and unsubscribe for approx 300 individual hikes).

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Marking as resolved!

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Oh! My apologies. I will research there then.

    Thanks again for all your help.

    Cheers
    Kathy

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Thanks ESMI! I ended up just starting over from scratch and it works now. My only guess is that something that I just couldn’t see was stuck out there. Consider this closed.

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Michael – WOW, thanks for the super fast response.

    Unchecking the shortcode box worked like a charm! The form kicked back the “you have already registered…” message perfectly. It also kicked out a “Validation errors occurred. Please confirm the fields and submit it again”. I’m assuming that’s because the user had already registered – but how do I stop that message from appearing in this instance?

    Thanks again!

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Hi. I understand the support of the theme particulars itself. I just wanted to make sure that I had set the child theme up correctly.

    Why both get_template_directory_uri() and get_stylesheet_directory_uri() return the same value seemed like a wordpress issue vs theme itself. But, I’m new at all of this. 🙂 So… Off to the theme developer I go….

    Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    That worked like a charm! We will have too many hikes to effectively use the drop down selector – so what I did was create a landing page that held the report of hikers signed up, and passed in the name of the hike. For anyone else that might need to do this, here’s the code I used.

    On the actual HIKE EVENT page, I displayed the list of hikers signed up as follows:
    [cfdb-table form="Dutchman Trail" class="hikersgoingclass" headers="your-name=Hiker Name,your-email=Email,your-phone=Phone,can-drive=Can Drive?,Num-hikers=Number of Hikers I Can Take" show="your-name,your-email,your-phone,can-drive,Num-hikers" limit="20" orderby="Submitted desc"][/cfdb-table]

    Then I included a button to take the users to the printable hikers list page, passing the hike name to the new page via the NAMEOFHIKE variable in the new page URL like this: suncityanthemhikingclub.com/who-is-going/?nameofhike='Dutchman Trail'

    Here’s the full line of code:
    <a href="http://suncityanthemhikingclub.com/who-is-going/?nameofhike='Dutchman Trail'">Click For Printable List of Hikers</a>

    The REPORT page code required that I strip the slashes out of the incoming NAMEOFHIKE. The report header uses the variable to identify the hike in question. This allows me to have one landing page that we can use for any hike. Here is that final code:

    <?php $nameofthehike=$_GET[nameofhike]?>
    
    <h1 style="text-align: center;"><strong>HIKERS WHO HAVE SIGNED UP</strong></h1>
    <h1 style="text-align: center;"><strong>FOR THE FOLLOWING HIKE</strong></h1>
     
    <h2 style="text-align: center;"><?php echo stripslashes($nameofthehike);?></h2>
    
       [cfdb-table form=<?php echo stripslashes($nameofthehike);?> class="hikersgoingclass" headers="your-name=Hiker Name,your-email=Email,your-phone=Phone,can-drive=Can Drive?,Num-hikers=Number of Hikers I Can Take" show="your-name,your-email,your-phone,can-drive,Num-hikers" limit="20" orderby="Submitted desc"]

    Thanks so much for all your help. Everything is working perfectly now.

    Cheers
    Kathy

Viewing 15 replies - 16 through 30 (of 32 total)