Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Same as well.

    My error log has also been filled with this message. Use to be once in a while, but now it’s constant.

    WordPress database error. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query SELECTpage_idFROM wp_statistics_pages WHEREdate= '2020-03-09' ANDtype= '' ANDid= made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_Statistics_Rest->hit, WP_Statistics_Hits->Pages

    WP Statistics V12.6.12
    Wordpress 5.3.2–en_CA

    Thread Starter darthyoda6

    (@darthyoda6)

    Sorry, that problem was my fault. I had 1.4.3 and 1.6.1 installed in 2 separate directories, with 1.4.3 disabled and 1.6.1 activated when I updated the plugin. Every other time it updated while deleting the other directory, but this time it deleted one and deactivated the upgraded plugin. Re-activating the 1.6.2 plugin got rid of the shortcodes showing.

    When you add multi-page to your Pro plugin then I’ll probably be switching to your Pro plugin and stop using the other multi-page plugin.

    • This reply was modified 5 years, 5 months ago by darthyoda6.
    Thread Starter darthyoda6

    (@darthyoda6)

    I updated to 1.6.2, and now it seems to be working correctly, but it’s also showing the shortcodes around all the groups now. Same page.

    • This reply was modified 5 years, 5 months ago by darthyoda6.

    You need to give some more details on what is not working properly.

    Thread Starter darthyoda6

    (@darthyoda6)

    Then would it be possible to add a WPCF7CF_LOAD_CS as well so we can block the css on non form pages?

    Thread Starter darthyoda6

    (@darthyoda6)

    I have the cache permanently turned off for the developer site, and on the live site the cache is turned off for the current application form. The current one on the live site has been worked on by 2 different developers, and contains a lot of inefficient code, so that’s why I decided to switch to CF7.

    The developer site for the forms starts on step 1 at https://kom.capprogramming.com/apply/contact1/ and goes up to step 8 at https://kom.capprogramming.com/apply/contact8/. If I work my way to step 8 filling everything in, then go to https://kom.capprogramming.com/apply/contact2/, I get that error message. I’m using the Pro version of the plugin, and can see everything is correctly there in the session storage, which I have at https://pastebin.com/iRUvJVzw. But using the previous and next buttons everything works fine.

    I can see that it does work correctly on your demo site, and I can’t figure out what’s different between yours and mine.

    Here’s the code from step 2 as an example:

    <label><span class="req">*</span>Do you currently have a Visa or applying for one?</label>[radio has_visa id:has_visa "Yes" "No"]
    [group visa inline]
    <label for="has_australian_visa"><span class="req">*</span>Do you have a current study visa for Australia / UK?</label>[radio has_australian_visa id:has_australian_visa "Yes" "No"]
    <br><label for="has_other_visa"><span class="req">*</span>Are you currently applying for another type of visa to Australia / UK?</label>[radio has_other_visa id:has_other_visa "Yes" "No"]
    [/group]
    
    <label for="visa_country">Which country are you applying for a visa from? </label>[text visa_country id:visa_country]
    
    <label><span class="req">*</span>Have you ever had a travel/student Visa rejected?</label>[radio had_visa_rejected id:had_visa_rejected "Yes" "No"]
    <div class="field-instructions"><strong>Note:</strong> If Yes, please contact KOM’s Admissions team to provide details.</div>
    
    <label for="requires_disability_support"><span class="req">*</span>Do you require disability support?</label>[radio requires_disability_support id:requires_disability_support "Yes" "No"]
    <div class="field-instructions"><strong>Note:</strong> If you have a disability which may affect your learning (e.g vision,
    hearing impairment, mobility, health), please contact KOM’s Admissions team who will guide you
    through the process of official supporting documents to receive disability assistance.</div>
    
    <label for="family_members"><span class="req">*</span>Will you be bringing family members ex. spouse / dependents (children)?</label>[select* family_members id:family_members include_blank "No" "Dual (yourself and one dependent)" "Multi-Family (yourself and more then one dependent)"]
    
    <label for="has_been_excluded"><span class="req">*</span>Have you ever been excluded from previous study?</label>[radio has_been_excluded id:has_been_excluded "Yes" "No"]
    <div class="field-instructions"><strong>Note:</strong> If Yes, please contact KOM’s Admissions team to provide details.</div>
    [hidden kc_captcha "kc_human"]
    
    <div class="center" role="group">[previous class:btn class:btn-primary class:prevBtn] [submit class:btn class:btn-primary class:nextBtn  "Next"]</div>
    [multistep "2-8-https://kom.capprogramming.com/apply/contact3/"]

    You can, but you’ll have to add the code yourself. Do a Google search for add_action( 'wpcf7_before_send_mail'

    Thread Starter darthyoda6

    (@darthyoda6)

    Thanks, seems to be working correctly now.

    Thread Starter darthyoda6

    (@darthyoda6)

    I was playing around with your code, and I added a console.log($group.attr('id')); to get the id of the group it was being called on, and using the code from your latest revision but isn’t live, added a console.log($inputs);, and figured out that it was activating the if ($group.attr('data-clear_on_hide') !== undefined) { after the group was being hidden, so .not(':button, :submit, :reset, :hidden') will never find the inputs in the group because they’re already hidden. So either you need to move that function before you hide the inputs in the group, or change the code to .not(':button, :submit, :reset').

    Also, you could also change if ($group.attr('data-clear_on_hide') !== undefined) to if ($group.data('clear_on_hide') !== undefined), but that doesn’t change the functionality of the code.

    • This reply was modified 5 years, 7 months ago by darthyoda6. Reason: added second paragraph
    Thread Starter darthyoda6

    (@darthyoda6)

    Your clear on hide code doesn’t work, so when I add my own for the dropdown’s, then everything works right. In my case if the textboxes don’t clear it’s not an issue, so I left the code alone for it.

    Thread Starter darthyoda6

    (@darthyoda6)

    Thanks. Quick testing shows that the code changes work.

    Thread Starter darthyoda6

    (@darthyoda6)

    It chooses the correct dropdown item, but it doesn’t trigger a selected event. So if you have any events that rely on something being selected, it will never be fired. Also, if you need to access the dom item that was selected, you can’t without the selected being set. You can get the value of the dropdown with val being set, not the actual item that was selected.

    <select name="uni_choice_1" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required" id="uni_choice_1" aria-required="true" aria-invalid="false">
        <option value="">---</option>
        <optgroup label="Australia">
            <option value="Flinders University">Flinders University</option>
            <option value="La Trobe University">La Trobe University</option>
            <option value="University of Sydney">University of Sydney</option>
            <option disabled="disabled"></option>
        </optgroup>
        <optgroup label="United Kingdom">
            <option value="Bangor University">Bangor University</option>
            <option disabled="disabled"></option>
        </optgroup>
        <optgroup label="Ireland">
            <option value="Institute of Technology, Carlow">Institute of Technology, Carlow</option>
        </optgroup>
    </select>
     $(document).ready(function() {
    var selected = $("#uni_choice_1 option:selected");
    var opt = selected.parent().attr('label');

    So after the form is re-populated I need to show or hide stuff depending on what was selected, and I also need the option group it’s in, cause the labels also tell me whether I need to show or hide stuff.

    So the working answer I found actually was from that article, but the second answer down with currently 144 votes.

    Thread Starter darthyoda6

    (@darthyoda6)

    So I wrote some jQuery that erases the selected values of the children when the main parent changes, and now the extra dropdown that’s was supposed to be hidden but wasn’t, is again.

    jQuery(function ($) {
            $('#current_education_level').change(function () {
                $('#kom_program_type_uni option:selected').prop("selected", false);
                $('#undergrad_preferences option:selected').prop("selected", false);
                $('#college_preferences option:selected').prop("selected", false);
            });
        });
    Thread Starter darthyoda6

    (@darthyoda6)

    It should be working right now. The text formatting is removed from the page, but the rest should be working. The form is in demo mode, so nothing will get submitted.

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