NetTalk Central

Author Topic: How to colspan  (Read 3009 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1845
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
How to colspan
« 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
-----------
Regards
Alberto

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: How to colspan
« Reply #1 on: May 30, 2019, 02:22:32 AM »
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
« Last Edit: May 30, 2019, 02:24:19 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: How to colspan
« Reply #2 on: May 30, 2019, 03:47:56 AM »
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

Alberto

  • Hero Member
  • *****
  • Posts: 1845
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to colspan
« Reply #3 on: May 30, 2019, 03:50:00 AM »
Thanks, I think its the best approach.
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1845
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to colspan
« Reply #4 on: May 30, 2019, 03:58:20 AM »
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
-----------
Regards
Alberto