Styling of HTML mails

Creative Contact Form is a responsive jQuery contact form with amazing visual effects. You will be surprised by count of all the possible features!
Mon Nov 25, 2019 7:15 pm

  • I have two questions concerning the styling and structuring of HTML mails:

    (1) How do I deal with conditional fields? Since I don't want the e-mail to use tables, I have to access the label-value pairs manually, at least as far as I can see. (Is that right? The automatic listing only works when put in a td environment.) So, if I have to access the fields manually by ID, I run into trouble with when it comes to conditional fields, since I want to have colons between them. So, is there a way to check whether the field was filled in, something like If [FIELD_ID159]=NOT-EMPTY: [FIELD_LABEL:159]: [FIELD_VALUE:159].

    (2) The other question concerns the form input. The e-mail seems to loose the line breaks of the text that is submitted in the forms. Is there anyway of maintaining them in the e-mail output?

    Thank you in advance!

    Best,
    WP
    WebPersona
     
    Posts: 8
    Joined: Sun Nov 24, 2019 7:30 pm

Tue Nov 26, 2019 2:12 am

  • I understand your question.

    You can get automatic listing of Field_label: Field_value pairs separated with colons, without styling, by using [FIELDS] structure in your Email Template.

    If you need to create custom Email Template with some styles, you should use Email Variables structure.

    There was no such need to use conditional fields in custom Html Emails, that is why I've implemented a new structure for that cases.
    [IF_EXISTS_ID:ID]
    code here
    [ENDIF]


    So in your case it will looks like
    Code: Select all
    [IF_EXISTS_ID:159]
    [FIELD_LABEL:159]: [FIELD_VALUE:159].
    [ENDIF]


    Don't forget about [ENDIF] part. :)

    I've created a topic about that here - http://forum.creative-solutions.net/post18223.html

    The issue regarding line breaks also has been fixed!

    To use the updates, please download the Business package again, and make update(version is still 4.6.2).

    Thanks.
    Best Regards,

    Simon
    User avatar
    Simon
    Site Admin
     
    Posts: 1620
    Joined: Wed Mar 05, 2014 1:04 am

Tue Nov 26, 2019 1:36 pm

  • That is great news, thank you very much for both the explanation and the fixes!

    Best,
    WP
    WebPersona
     
    Posts: 8
    Joined: Sun Nov 24, 2019 7:30 pm

Wed Nov 27, 2019 5:40 am

  • You are always welcome!
    Best Regards,

    Simon
    User avatar
    Simon
    Site Admin
     
    Posts: 1620
    Joined: Wed Mar 05, 2014 1:04 am

Mon Dec 30, 2019 6:17 pm

  • Thank you again for implementing the conditional logic for conditional fields! That proved very valuable.

    Is there a way to provide a similiar check for non-obligatory fields? By that, I mean something like:
    [IF FIELD_VALUE:161=NOT-EMPTY]
    [FIELD_ID=161]: [FIELD_VALUE:161]
    [ENDIF]

    With no such condition, I end up with emails that contain lines like
    :
    in case the field was left empty.

    That would be really great!

    Best,
    WP
    WebPersona
     
    Posts: 8
    Joined: Sun Nov 24, 2019 7:30 pm

Mon Dec 30, 2019 11:23 pm

  • Hi,

    You should not have empty colons even if the value is empty, cause you should use
    [FIELD_LABEL:161]: [FIELD_VALUE:161]

    structure, so when user did not type value, it will show only label, and colon:
    Field_Label:

    I don't think it is necessary to hide field's label, if user left the value empty, cause that field still exists in the form.

    Thanks.
    Best Regards,

    Simon
    User avatar
    Simon
    Site Admin
     
    Posts: 1620
    Joined: Wed Mar 05, 2014 1:04 am



Return to Creative Contact Form




Information
  • Who is online
  • Users browsing this forum: Bing [Bot] and 11 guests
cron