Forum Discussion

DavidMcFadyen's avatar
DavidMcFadyen
Qrew Member
6 years ago

Trouble creating a table (not a quick base table) using a formula rich text field

Hello,

I have successfully coded a rich text field to display data in the form of a table with no borders. However, when the field displays on the form in Quick Base, there is a ton of white space at the top of the field. I can't figure out what is causing this. Any help would be great. I have included a file with 2 screenshots. One is the code and the other is how it is displaying. Thanks, Dave.

------------------------------
David McFadyen
------------------------------
  • AustinK's avatar
    AustinK
    Qrew Commander
    Could you embed the screenshots rather than posting a pdf? You should be basically able to copy and paste them into the post. Also if you post your code as text then people can edit and view it easier.
    • DavidMcFadyen's avatar
      DavidMcFadyen
      Qrew Member
      Austin,

      Thanks for the tips. Below is the field displaying and the code.

      Field on form




      Code

      If([Payment Breakdown Choice] = "10,20,30,30,10",

      "<table cellspacing=30>" &
      "<tr><td>" & "<b>" & "10%" & "</b>" & "</td>" & "<td style='text-decoration: underline'>" & "<b>" & [10% Due Upon (Various)] & "</b>" & "</td>" & "<td>" & "due upon acceptance of proposal" & "</td> </tr><br /><br />" &
      "<tr><td>" & "<b>" & "20%" & "</b>" & "</td>" & "<td style='text-decoration: underline'>" & "<b>" & [20% Due to Initiate] & "</td>" & "<td>" & "due to initiate project construction." & "</td> </tr><br /><br />" &
      "<tr><td>" & "<b>" & "30%" & "</b>" & "</td>" & "<td style='text-decoration: underline'>" & "<b>" & [30% Due at 50%] & "</td>" & "<td>" & "due upon completion of 50% of the project construction." & "</td> </tr><br /><br />" &
      "<tr><td>" & "<b>" & "30%" & "</b>" & "</td>" & "<td style='text-decoration: underline'>" & "<b>" & [30% Due at 90%] & "</td>" & "<td>" & "due upon completion of 90% of the project construction." & "</td> </tr><br /><br />" &
      "<tr><td>" & "<b>" & "10%" & "</b>" & "</td>" & "<td style='text-decoration: underline'>" & "<b>" & [10% Due Upon (Various)] & "</td>" & "<td>" & "due upon project completion and approval/acceptance by the Owner." & "</td> </tr><br /><br />" &

      "</table>", "This is a test.")



      ------------------------------
      David McFadyen
      ------------------------------
      • AustinK's avatar
        AustinK
        Qrew Commander
        The entire Rich Text field element in the dom has 10 line breaks in it above the code that you inserted into the field when using the above code. This is the hint at how to fix it because you also have 10 line breaks in your code. Remove those and just use the cell spacing or other styles to adjust the table and it should work for you. I just tested it myself.