Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • in reply to: Send label select menu Notification #35417
    marianogi
    Participant

    Hi, Ally. I don’t know why your code does not work for me, I never get the label value.

    I get the value with:


    add_filter('quform_post_process_1', function (array $result, Quform_Form $form) {
    $data = array(
    'provincia' => $form->getValue('quform_1_17')
    );
    }, 10, 3);

    And also this:

    function add_option_label_to_value($value, Quform_Element_Multi $element, Quform_Form $form) {
    if ($form->config('environment') == 'frontend') {
    foreach ($element->getOptions() as $option) {
    if ($option['value'] == $value) {
    $value = esc_html($option['label']) . ' (' . $value . ')';
    }
    }
    }
    return $value;
    }
    add_filter('quform_get_value_html_1_17', 'add_option_label_to_value', 10, 3);

    So why I don’t get this value: esc_html($option[‘label’]) . ‘ (‘ . $value . ‘)’ when I read the value: $data[‘provincia’] ?

    I read the the value as if the ‘quform_get_value_html’ code wouldn’t exists.

    I don’t know what I am doing wrong. Thank you for your help

    in reply to: Manage Licenses #35246
    marianogi
    Participant

    Thank you, Ally. It works now

    in reply to: Can’t change field value #34774
    marianogi
    Participant

    You leave me speechless. Believe me, you have the best plugin, support and documentation I ever see, after many years buying dozens of plugins and themes.
    Please consider making a multipurpose theme and I’ll be there! 🙂

    Thank you!!

    in reply to: Can’t change field value #34724
    marianogi
    Participant

    Thank you!, this is a very useful information to me!. Hope you can make a documentation page soon.

    in reply to: Can’t change field value #34719
    marianogi
    Participant

    Great!! thank you!, about that, can you tell me where to see all that variable combinations? I mean a documentation page or similar where I can learn all that variables. I think I saw another modifier (I don’t know how to call it) to write a date with another date format. I’d like to see all possibilities of it.

    Thank you again!

    in reply to: Change uploaded file name #34713
    marianogi
    Participant

    Hi!, thank you!, I thought some “iphorm” hooks were still alive. Your solution worked great.

    in reply to: Can’t change field value #34711
    marianogi
    Participant

    Hi!, thank you for your fast response and help, as always.

    Yes, I am sure 4_69 is the correct ID. And here you can check the form:
    https://sercodi.es/empleo-2/

    (I send the url like this because the comment cropped the ‘/empleo-2/’ part of the link, I don’t know why.

    Let me know if you need credentials to see the backend and my code.

    • This reply was modified 2 years, 8 months ago by marianogi. Reason: URL cropped and not working
    in reply to: Pods integration #34293
    marianogi
    Participant

    Hi again, here I post what I needed to integrate with Pods plugin. Maybe I can help more people with the same need:

    add_filter('quform_post_process_1', function (array $result, Quform_Form $form) {
        $pod_field1 = $form->getValue('quform_1_2');
        $pod_field2 = $form->getValue('quform_1_3');
        $pod_field3 = $form->getValue('quform_1_4');
    
        $fields = array(
    	'post_title'		=> 'item name:' . ' - ' . $pod_field1,
    		
            'pod_field1'	=> $pod_field1, 
            'pod_field2'	=> $pod_field2, 
            'pod_field3'	=> $pod_field3
        ); 
                         
        $new_id = pods( 'pod_name_here' )->add( pods_sanitize ($fields) ); 
    
     
     return $new_id;
    }, 10, 2);
    

    Very easy!

    in reply to: Pods integration #34290
    marianogi
    Participant

    Oh, thank you very much!, that’s the kind of help I needed!!

    I always get suprised by your plugin, its complete documentation and your great support. My favourite plugin ever! 🙂

    in reply to: Session variables #33751
    marianogi
    Participant

    OMG!!! I can’t believe your support! IT WORKED!!! Thank you very much!!
    I know this could be beyond your support posibilites but you choose to help people and spend a lot of time with their issues.
    Simply this is my best experience purchasing a plugin in 10 years at Codecanyon. I will tell this in their plugin rating, you really deserve it.
    Thank you again!

    Sincerely,
    Mariano

    in reply to: Session variables #33743
    marianogi
    Participant

    Hi!, thank you again for your concern and help.

    “if the chart script is getting the data through its own request it might not include the session cookie” -> I agree with you, but I didn’t know that could be possible: to make a call to that script without session variables, in the same server.
    “Does it work if you visit the form-desigualdad-API.php directly?” -> yes, “form-desigualdad-API.php” works when I call it directly, but with parameters, of course, not with session variables. That’s why I thought that maybe WordPress is killing the session variables before the API call.

    “if it’s possible to forward the cookie with the chart script data request”, I think I don’t understand what you mean. If you mean passing the data with parameters like “form-desigualdad-API.php?entryid=X”, that’s exactly what I am doing now, and it works, as I said before. But I don’t like this solution, I prefer to use your class and session variables functionality, so my call is much cleaner (and maybe safer too).

    Kind regards,
    Mariano

    • This reply was modified 3 years, 6 months ago by marianogi. Reason: fix expression error
    in reply to: Session variables #33732
    marianogi
    Participant

    I think that maybe it is important to explain the whole workflow:

    -Users fill the quform, and it automatically redirects to a results page that shows some charts.
    -The chart plugin can get dynamic data from an API URL in JSON, but I need that API URL to be unique to show only the user results, I mean, by his/her entry_id.
    -I am resolving this by now with shortcodes, using you session variables between “add_filter(‘quform_post_process_1′” and “add_shortcode(“. So the shortcode returns a customized URL with the entry_id

    -All this wouldn’t be necessary if the second file could get the session variable the same way the “add_shortcode” does. And I think it would be a bit safer because I don’t like to use variables in the API URL call if they are not necessary.

    I hope I have explained it well, thank you again and again.

    in reply to: Session variables #33731
    marianogi
    Participant

    Hi Ally, thank you again for helping me with this.

    I can confirm that the domain doesn’t change at all. Not even the folder changes, both PHP scripts are in the same folder.

    I have sent the admin credentials through your feedback form.

    Let me explain a bit where is that code:

    I create a plugin to handle all this named “QuForm – Personalización” (at ‘form-desigualdad’ folder). The file that stores the session variable is “form-desigualdad.php” and the file that should get it is “form-desigualdad-API.php”. In this file, I have commented all the session code. You can uncomment it to make your tests.

    Thank you very much!

    in reply to: Session variables #33727
    marianogi
    Participant

    Hi, thank you for your super fast response. It does not work for me. I could check that it loads the Quform class because it passes the if ( ! class_exists('Quform')), but after that, I try to get the session and form with $session = Quform::getService('session');
    $form = $session->get('formulario');

    and it does not pass the if ( ! $form instanceof Quform_Form).

    Could it be that something is destroying your session variables?

    Thanks again!

    • This reply was modified 3 years, 6 months ago by marianogi.
    • This reply was modified 3 years, 6 months ago by marianogi.
    in reply to: Not autoscrolling top on page changes #31700
    marianogi
    Participant

    I solved it by changing the “Scroll offset” value.

Viewing 15 posts - 1 through 15 (of 15 total)
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy