Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty Issues Formtools custom export type

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Help Wanted (commercial)
View previous topic :: View next topic  
Author Message
f_marcucci
Smarty n00b


Joined: 30 Nov 2020
Posts: 1

PostPosted: Mon Nov 30, 2020 4:47 pm    Post subject: Smarty Issues Formtools custom export type Reply with quote

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
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Tue Dec 01, 2020 10:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
deepvyas
Smarty Rookie


Joined: 19 May 2017
Posts: 9
Location: India

PostPosted: Thu Dec 03, 2020 1:41 pm    Post subject: Smarty Developer Reply with quote

Hi ,
I can help you on expectation
Please connect further
eMail - deepvyas71@gmail.com


Regards
Deep
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Help Wanted (commercial) All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP