Email form data - checkbox items to list

sinemac 22 Sep, 2009
How would I go about changing the way multiple selected checkboxes would be listed in an email?

Currently, if I have a bunch of checkboxes all with the same name, and therefore creating an array, in the email they show up as:

Item 1, Item 2, Item 3



Is there any way to get the email process to parse that array into a list format instead? I'd like the email to end up as:

[list]

  • Item 1
  • Item 2
  • Item 3
  • [/list]



    I know I could do the form so that the checkboxes are all separate database entries rather than an array, but I don't really want to do that... plus, that would mean potentially a bunch of blank space in the email if some of the checkboxes aren't checked.

    Ideas?

    Thanks,
    Scott
    GreyHead 23 Sep, 2009
    Hi Scott,

    You can add some PHP in the OnSubmit Before box to 'process' the values into an html list. If you are saving thr data in the database then you'll need to save the html list in a new variable and use that in the email template.

    You may hit the problem that with ChronoForms processing sequence (string substitution is done before the OnSubmit Before code runs) in which case you'll need to add a placeholder like ##@## to the template and use str_replace to substitute the new value.

    Bob
    appletown54 05 Oct, 2009
    Can you please post the code that is needed to do this. I've looked all over the web and chant find anything that has worked, i'm not a programmer and really need to get this to work.
    udaydahale 04 Dec, 2009
    i created a form in that i included checkbox in that form


    there is an issue for email template
    when i can select one checkbox in list of checkboxes

    i want only that checkbox value in email template and another value also displayed



    sorry for english
    Max_admin 05 Dec, 2009
    udaydahale, try to show me some image ? I can't understand the problem here!

    appletown54, do you still need this ?

    Regards,
    Max
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    This topic is locked and no more replies can be posted.