Hi,
is it possible to get submission fields by field key?
I've red the theming.txt. In $submission, I don't have field name but something like

...
[data] => Array
          (
              [1] => Array
                  (
                      [value] => Array
                          (
                              [0] => aa
                          )

                  )

              [2] => Array
                  (
                      [value] => Array
                          (
                              [0] => bb
                          )

                  )
....

If my first field has name 'abc', how to print 'abc' value?

I ask because i would like to align fields as if inside a table, so my user can copy easily in his excel file.
In php, before drupal, I worked with tab to align my message. Is it no more possible?
It was like that

	$message 		.= "Email:	{$_POST['email']}\n";
	$message 		.= "Abo Std:	{$aboStd}\n";
	$message 		.= "Abo Soutien:{$aboSoutien}\n";
	$message 		.= "case Don:	{$caseDon}\n";

Shall I need mimemail and mailsystem to archieve that?

Comments

vernond’s picture

While in edit mode on your Webform, click on the emails tab and set up your email using the token values support.

sahuni’s picture

Thanks for the help
I succeed creating a template of mine in my theme folder, usings tabs, for example :

<?php print 'Nom :		'; ?>
%value[nom]
<?php print 'Localité :	'; ?>
%value[localite]

Besides, I don't understand very well what could be done in interactif template got at url ... /node/45/webform/emails/1 .
If I understand well, it's for small changes. it's easy to change the text, suppress something. Could all the job I mentionned for my real custom template be done inside the interactive template? I tried to use %email[nom] in interactive template, but it just show the constant %email[nom] in the mail. It's not the purpose of interactive template?

vernond’s picture

I have not yet run into problems with the email template, inserting images and changing the text and whatever else. Maybe you just need to play with it a bit more?

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity.

honigferd’s picture

Status: Closed (fixed) » Active

How can you actually access the Submission values in the Template via PHP?

The tokens are "just enough" for the most basic things, but even displaying completely different texts to those in the form seems impossible by just using tokens now. Is there a way around that like "in the old days" where you could just do everything in the E-Mail template file?

quicksketch’s picture

Status: Active » Closed (fixed)

As mentioned in the submission guidelines, I don't provide help with custom coding:

Any issues regarding "how do I code ..." or "how do I theme ..." will not be answered. Please look elsewhere for coding resources.

Please refer to other resources such as IRC or Drupal StackExchange to ask your questions.

honigferd’s picture

"Please always use the project issue tracker to report bugs, support and/or feature requests. I don't read the forums and I don't reply to direct e-mails for support."

You want clear that up instead of sending people to places that will send people here.