NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on May 29, 2019, 08:38:52 AM
-
Hi, I need a value to take 3 columns, using F12 and adding it to the <td> it works ok.
How to add the colspan=3 to the column in the template?
Theres only a Row Span field.
Thanks
-
If you just want to inject colspan=3 for that one field check out the variable loc:extra.
Go into value::nombre. Then to the embed just above where the input field is created.
You can set loc:extra as loc:extra = 'colspan=3' and it will be added to the generated HTML.
This is a pretty clever way to add specific customization to your fields. Thanks Bruce!
Don
-
I've added a template option for NT 11.12.
However it's gonna get complicated because there are "logical" columns (prompt/value/comment) and "physical" td columns.
So in your case you are spanning 2 "logical" columns, but actually 3 columns in the html (because you're spanning value / prompt / value). If you have comments on then it would be 4, and so on.
Calculating this (in code) is tricky because it's possible for some fields to suppress comments, span prompt/value/comment cells and so on.
so for now I think I'm gonna use this setting as a _physical_ setting - but that means if you change the layout of the form it "won't change" and hence will likely be wrong. But it's a simple approach in the short term.
Cheers
Bruce
-
Thanks, I think its the best approach.
-
Don, did you test colspan in loc:extra ?
This does not work because loc:extra affects the input html field and not the td wich is what you need to colspan.
Regards