session variable missing

Home Forums Quform WordPress session variable missing

This topic is: not resolved
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #25775
    graines
    Participant

    using quform 2.3.

    following use of an earlier version – we were using this syntax.
    “post_title” => $_SESSION[“iphorm_2”][“.iphorm_2_3”]

    However with the update it looks like we need to change the references to our field names, can someone confirm if this following new syntax is correct and if not what should it be.

    “post_title” => $_SESSION[“quform_2”][“.quform-field-2_3”]

    Thanks

    #25783
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #25969
    graines
    Participant

    Hi Ally

    Apologies for the delay in coming back to you. We’ve tried your suggestion and this doesn’t seem to work.

    We’ve changed all references in the bespoke code from iphorm to quform.

    Your manuals seem to suggest using .quform-field-1_1.

    Any ideas. I’ve attached a code snippet to show you how it’s applied.

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #25990
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #26040
    graines
    Participant

    Hi again Ally

    Thanks for your email.

    We have some bespoke code below that references the file upload procedure but i’m unable to see a reference to the text keys that you mention.

    Would we be correct in assuming that changing the references to “fullPath” to “path” would be partly correct?

    Regarding the text key references – what would we need to change in order to replace the keys with “name”?
    Or do we need to simply have both [path] & [name] together in order to build up the map to the image file?

    Here is our current live code fragment (this is repeated a number of times for each image) – could you take a look and advise please?

    Thanks for your help.

    Regards
    Gavin

    // if gallery image 1 (logo) uploaded
    if(isset($_SESSION[“quform_2”][“quform_2_32”][0][“fullPath”]) && !empty($_SESSION[“quform_2”][“quform_2_32″][0][” fullPath “])) {
    $filename = $_SESSION[“quform_2”][“quform_2_32″][0][” fullPath “];
    $parent_post_id = $_SESSION[“entryid”];
    switch(pathinfo($filename, PATHINFO_EXTENSION)) {
    case ‘jpg’:
    case ‘jpeg’:
    $filetype = ‘image/jpeg’;
    break;
    case ‘png’:
    $filetype = ‘image/png’;
    break;
    }
    $attachment = array(
    ‘guid’ => $_SESSION[“quform_2”][“quform_2_32″][0][” fullPath “],
    ‘post_mime_type’ => $filetype,
    ‘post_title’ => preg_replace(‘/\.[^.]+$/’, ”, $_SESSION[“quform_2”][“quform_2_32”][0][“text”]),
    ‘post_content’ => ”,
    ‘post_status’ => ‘inherit’
    );
    $attach_id = wp_insert_attachment($attachment, $filename, $parent_post_id);
    require_once(ABSPATH . ‘wp-admin/includes/image.php’);
    $attach_data = wp_generate_attachment_metadata($attach_id, $filename);
    wp_update_attachment_metadata($attach_id, $attach_data);
    set_post_thumbnail($parent_post_id, $attach_id);
    $image1id = $attach_id;
    $attach_id = ”;
    }

    #26046
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #26051
    graines
    Participant

    Hi Ally – thanks again for your continued support.

    I’ve added in your suggestions and still cannot get the code to function correctly.

    I’ve attached the php file for you to look at if that helps.

    Thanks

    #26052
    graines
    Participant

    Attached as a zip.

    Attachments:
    You must be logged in to view attached files.
    #26083
    graines
    Participant

    Hi Ally

    I just wondered if you had any further suggestions on this please?

    Thanks

    #26090
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #26104
    graines
    Participant

    Hi Ally

    We’re really struggling with this one. I think that the code we sent you is the only code that is required? The only other references I can see are in the functions.php file (attached). I’ve changed the Iphorm to quform in here and it’s still not working.

    Appreciate your help with this.

    Attachments:
    You must be logged in to view attached files.
    #26107
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #26108
    graines
    Participant

    You’re a star! Thank you so much. That seemed to have worked.

    Just one other thing, is there a way to add a ‘Please wait’ message once the form is submitted. We’re finding people are closing the window before the confirmation page is loaded and information submitted.

    Thanks so much again.

    #26134
    graines
    Participant

    Hi Ally

    Following on from my previous question regarding adding a ‘Please wait’ message to the form to prevent people closing the window too early. I found this in your support forum – however it doesn’t seem to work. Is there any updated version required for the new form release please?

    <script>
    jQuery(document).ready(function ($) {
    $(‘.iphorm-loading’).text(‘Please wait while your files are uploaded. Do not refresh or click submit again’).css({
    ‘background-position’: ’10px center’,
    ‘text-indent’: 0,
    ‘padding-left’: ’40px’
    });
    });
    </script>

    Thanks – I’ve already tried changing .iphorm-loading to .quform-loading

    #26152
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy