Forum


Replies: 2   Views: 4769
Question/suggestion with regards to truncating
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by akevon  · 22-04-2015 - 17:42

Hi, We are evaluating a potential purchase of corporate license for phpdocx. The product looks great so far, and we were looking for a way to give the form designers more control over 'truncation' rules for different fields. As far as I know, the only way we can control truncating is by specifically truncating the data prior to the placeholder replacement, correct? If so, might there be some way in which placeholder variables can contain additional data in them? e.g. $FIRSTNAME[maxlen:50]$ If so, we could do something like getTemplateVariables prior to the replacements and read the maxlength attribute out of the variables metadata, thereby granting the form editors control over truncation rules. Allowing metadata in placeholders could be a powerful, abstract way to unlocking all sorts of interesting possibilities beyond just truncation, although that's our primary focus right now. I don't know if something like this is possible, or perhaps you provide a different workaround for controlling truncation?

Posted by admin  · 23-04-2015 - 08:09

Hello, The current version of phpdocx doesn't support metatags when replacing placeholders, so you'd need to do it before doing the replacement. We have added a task to consider the feature you suggest. Regards.

Posted by akevon  · 23-04-2015 - 15:47

Sounds good, thank you :)