Forum Discussion

FICO's avatar
FICO
Community Manager
15 years ago

Display in RMA

Display in RMA

Hi All,  
  •  I have a code template where i display two text box in a table as two columns.
  • In my main template i have place this code template in a VH with count 1 or more. Now when i add a rule through RMA , the delete icon "X"is displayed in one line and my table row (i.e 2 columns) displays in another line. Also that columns are not in similar alignment, it's in zigzag position. And the position of 2nd column moves automatically depend on the first column text.   I want my delete icon as well as code template textbox to get displayed in a same row. i.e delete icon, textbox1 , textbox 2 as 3 columns of table. Also, the no of textbox 2 also display in same vertical line.
  • kindly please tell me if there is any way to do this.
Thanks,

Moharun

3 Replies

  • FICO's avatar
    FICO
    Community Manager

    The reason you see this behaviour is that tables are block elements in html, and by default break to new lines. Also, column alignment is not enforced across tables, which is what you get if every template instance defines a table-tag.

    Leave the table definition to the code template that contains the list, and let the repeating code template only create table rows. That gives you vertical column alignment. To fix the delete icon, you'll probably have to inspect the generated html and provide a custom CSS that moves the icon into place.

    Regards,

    Jostein

  • FICO's avatar
    FICO
    Community Manager

    Thanks for your reply Jostien...

    Now it all comes in the same line but if the size of the text changes means the position of the text box will also changing automatically..

    I want to display the text box in the fixed position even the size of the text changes...

    for eg:-

    Now it showing like

    Name Xavier

    Sex Male

    Occupation Business

    but i want to show like this

    Name                Xavier

    Sex                     Male

    Occupation       Business

    So, plz give me some ideas.....

    Thanks & Regards,

    Moharun

  • FICO's avatar
    FICO
    Community Manager

    This is a matter of formatting, and you can put HTML formatting directly into the Display Area of a template to give instructions on how it should look.  So I would suggest doing something like this for the individual rows of your text box:

    <tr style="border: 1px solid black;"><td width="200" style="border: 1px solid black;"><Characteristic></td><td width="100" style="border: 1px solid black;"><Characteristic Value></td></tr>

    where <Characteristic> and <Characteristic Value> are the placeholders for the values you are showing.  This not only gives you the spacing, but puts a border around each row and cell as well.  It could take some tweaking, since the use of a count of 1 or more is going to enforce some extra icons to appear.  In the placeholder for the "1 or more" item, you can also check out that there are multiple choices for the UI layout: default, table, and tab.  The table choice may give you something closer to what you want to start, but it also could conflict with specific HTML tags you set up, the tabs choice makes it so rows can be hidden or shown, not really hopeful for your use case, but something to keep in mind.