• Resolved hansg19

    (@hansg19)


    Hello guys,

    I’d like to change my automated contact form mail to not include some sensible fields like bankaccount number. I found the variable $hidden_fields in class-fscf-process.php which seems to be suitable for this issue.
    In the normal config (latest version) the variable is initialized like this:
    $hidden_fields = $_SESSION["fsc_shortcode_hidden_$frm_id"];

    How can I add the specific fields I like to hide in the mail? I want to collect this data from “Contact Form DB”.
    Seems to be possible with Shortcodes. How to find and add the specific shortcode?

    Much thanks for your help

    Yours Johannes

    https://wordpress.org/plugins/si-contact-form/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi, you might like to read the following documentation. It might put you on the right track.

    If you need more support in regards to your question here, there is a support link in the above mentioned URL. Use that link to submit a support ticket.

    Thank you

    Thread Starter hansg19

    (@hansg19)

    Hi,

    there’s unfortunately no helpful answer in the documentation.
    Is there anyone in the forum who had a similar issue? I don’t think that this is a support issue because the function to hide fields is given and I just don’t understand how to use it.

    Can anyone tell me what output of $_SESSION["fsc_shortcode_hidden_$frm_id"] looks like? I’m not used in debugging php code 🙁

    Thanks

    I have submitted a message to the developer.

    Thread Starter hansg19

    (@hansg19)

    @mbrsolution: have you heard any news from the developer?

    Sorry about this. No, I have not heard any news. Sometimes the developer is busy doing other things. I have submitted another message.

    Regards

    The code you mentioned relates to the features on this help page.
    Setting optional form parameters with shortcode.
    http://www.fastsecurecontactform.com/shortcode-options

    Thread Starter hansg19

    (@hansg19)

    I found a solution which unfortunally need to edit the file ./includes/class-fscf-process.php

    I’ve added 2 lines:

    // ********* Now process the fields set up in Options **********
            $fields_in_use = array();
    
    // ****Part 1 of sulution: Add the field labels which have to be hidden to a array****
            $fields_hide = array("An:","Titel:","Telefon:","Kontoinhaber:","Kontonummer:","Bankleitzahl:","Bankinstitut:","Anrede:","Straße:","Hausnummer:","PLZ:","Ort:","Email:");
    // ****End of Part 1****
    
    foreach ( self::$form_options['fields'] as $key => $field ) {
    
    			if ( 'true' == $field['disable']  || 'fieldset-close' == $field['type'] ) continue;
    
    // ****Part 2 of sulution: Skip hidden fields****
    			if(in_array($field['label'],$fields_hide)) continue;
    // ****End of Part 2****
    
                $fields_in_use[$field['slug']] = 1;
    			if ( 'fieldset' == $field['type'] ) {
    				self::$email_msg .= self::make_bold($field['label']) . $inline_or_newline;
    				continue;
    			}
    Thread Starter hansg19

    (@hansg19)

    SOLVED

    Hi, thank you for sharing your solution. Just a reminder that your custom settings in the above mentioned file will be lost once you update the plugin.

    Kind regards

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Adding hidden fields for mail content’ is closed to new replies.