|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
f_marcucci Smarty n00b
Joined: 30 Nov 2020 Posts: 1
|
Posted: Mon Nov 30, 2020 4:47 pm Post subject: Smarty Issues Formtools custom export type |
|
|
Hi guys, I've a problem with Smarty Template. What I'm doing right now is to export groups of data from an online tool called Formtools (www.formtools.org) via Smarty template. I've got a script who export data by colums, but I need to group some of that fields into another one completely different. How can I select all the columns I need and put them into another field?
This is the script:
[code]
{strip}
<export>
<export_datetime>{$datetime}</export_datetime>
<export_unixtime>{$U}</export_unixtime>
<form_info>
<form_id>{$form_id}</form_id>
<form_name><![CDATA[{$form_name}]]></form_name>
<form_url>{$form_url}</form_url>
</form_info>
<view_info>
<view_id>$view_id</view_id>
<view_name>Dati preliminari</view_name>
</view_info>
<submissions>
{foreach from=$submissions item=submission name=row}
<submission>
{foreach from=$display_fields item=field_info name=col_row}
{assign var=col_name value=$field_info.col_name}
{assign var=value value=$submission.$col_name}
<{$col_name}><![CDATA[{display_field_by_col_name form_id=$form_id
view_id=$view_id submission_id=$submission.submission_id
field_info=$field_info field_types=$field_types
settings=$settings value=$value}]]></{$col_name}>
<message><![CDATA[{assign var=message value=$submission.$message}]]></{$message}>
{/foreach}
</submission>
{/foreach}
</submissions>
</export>
{/strip}[/code] |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Tue Dec 01, 2020 10:01 pm Post subject: |
|
|
You can use a Smarty variable in a template more than once.
So, there is your
Code: | <export_datetime>{$datetime}</export_datetime> | and you can use {$datetime} many more times wherever you want to show it. |
|
Back to top |
|
deepvyas Smarty Rookie
Joined: 19 May 2017 Posts: 9 Location: India
|
Posted: Thu Dec 03, 2020 1:41 pm Post subject: Smarty Developer |
|
|
Hi ,
I can help you on expectation
Please connect further
eMail - deepvyas71@gmail.com
Regards
Deep |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|