Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1319669

    Dear Enfold Team,
    I have created a contact form in which I would like to send the sender a confirmation email.
    I have entered the corresponding text of the email in the associated field.
    Unfortunately, Enfold also inserts a separate blank line when a line breaks.

    How can I work around this problem?

    Best regards,
    Jo Meyer

    #1319828

    Hey Jo,

    Thank you for the inquiry.

    Are saying that the line breaks are duplicated? Are you using br tags? Try to use the RETURN or ENTER key to create a new line instead of the br tags. Please provide a screenshot of the issue using imgur or dropbox.

    Best regards,
    Ismael

    #1319953

    Dear Ismael,
    Thank you for your answer.

    Yes, the line breaks are duplicated.
    I didn’t use any br tags, just the RETURN key or, as an experiment, Shift-RETURN.
    I also tried br tags, but that didn’t change anything either.

    Best regards,
    Jo

    #1320145

    Hi,

    Thank you for the info.

    Try to wrap the paragraphs or each line inside a paragraph tag with a class attribute. Example.

    
    <p class="av-ar-line">Something important here.</p>
    <p class="av-ar-line">Something more important here.</p>
    <p class="av-ar-line">Something very important here.</p>
    
    

    Make sure to close the tags properly because they could break the layout of the email message.

    Best regards,
    Ismael

    #1320229

    Dear Ismael,
    Your solution created even larger gaps.
    Do you have any other idea or solution?

    Best regards,
    Jo

    #1320342

    Hi,

    I see. Try to modify the enfold/framework/php/class-form-generator.php file, look for this code around line 1339 and remove the nl2br functions wrapping the autoresponder message.

    	$mess  = nl2br( $this->form_params['autoresponder'] );
    					$mess .= '
    
    <strong>' . __( 'Your Message:','avia_framework' ) . ' </strong>
    
    ';
    					$mess .= $message;
    
    					if( ! empty( $this->form_params['autoresponder_after'] ) )
    					{
    						$mess .= '
    ';
    						$mess .= nl2br( $this->form_params['autoresponder_after'] ) . '
    
    ';
    					}
    

    The function nl2br automatically create br tags after any new lines, so removing it should help.

    Best regards,
    Ismael

    #1320777

    Dear Ismael,
    your solution works.

    Thanks.
    Best regards,
    Jo

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Contact form – responder email – line break’ is closed to new replies.