Hi ,
i tried to add a rich (html) area to a custom tabs but it spread all over the tab.
is it supported in custom Tabs?
shay.
rich (html) area in custom Tabs
Re: rich (html) area in custom Tabs
Good morning,
I've just tested adding a text/richtext field to a tab and for me it works as expected:
This is the code in
The fieldname is
Are there any errors in console and did you clear browser cache on reload?
Can you share a screenshot so we can see what's happening and perhaps post the errors (in console tab of your browser's dev-tool), if any.
https://appgini.bizzworxx.de/support/troubleshooting/
I've just tested adding a text/richtext field to a tab and for me it works as expected:
This is the code in
hooks/TABLENAME-dv.js
:Code: Select all
const dv = AppGiniHelper.DV;
dv.addTab("tabRichtextTest", "Tab", null, ["text_richtext"]);
text_richtext
in this example.Are there any errors in console and did you clear browser cache on reload?
Can you share a screenshot so we can see what's happening and perhaps post the errors (in console tab of your browser's dev-tool), if any.
https://appgini.bizzworxx.de/support/troubleshooting/
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.14 Revision 1665 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.14 Revision 1665 + all AppGini Helper tools
Re: rich (html) area in custom Tabs
dear Jan,
thanks for your reply.
i need to add it as row together with other fields.
my code now:
status on raw 01 is the rich text field.
and this is what i get:
thanks for your reply.
i need to add it as row together with other fields.
my code now:
Code: Select all
const dv = AppGiniHelper.DV;
var row_01 = dv.addLayout([6,5])
.add(1, ["Status"]).sizeLabels(2);
var row_02 = dv.addLayout([7,5])
.add(1, ["Poject_val"]).sizeLabels(2);
var row_03 = dv.addLayout([7,4])
.add(1, ["billing_poten"]).sizeLabels(2);
var row_04 = dv.addLayout([7,4])
.add(1, ["bill_cost"]).sizeLabels(2);
dv.addTab( "elec-tab", "חשמל", "flash" )
.add(row_01).add(row_02).add(row_03).add(row_04);
and this is what i get:
- Attachments
-
- richtect.PNG (61.49 KiB) Viewed 2772 times
Re: rich (html) area in custom Tabs
Good morning!
Adding richtext fields to custom tabs works as expected. Calling
But let us go step by step:
I'm using a test-database table here, having such "strange" field names like "text_richtext", "int", "double" etc. which is just for testing reaons on different datatypes.
file:
Now, when calling
Here is my recommendation:
From my point of view this looks quite pretty. I hope this helps.
tl;dri tried to add a rich (html) area to a custom tabs but it spread all over the tab.
Adding richtext fields to custom tabs works as expected. Calling
.sizeLabels()
on custom multi-column layouts, which haven been added to custom tabs, causes an unexpected result.But let us go step by step:
I'm using a test-database table here, having such "strange" field names like "text_richtext", "int", "double" etc. which is just for testing reaons on different datatypes.
file:
hooks/TABLENAME-dv.js
- First I create a row (AKA "Layout") with two columns:
Remember that, in Bootstraps 12-columns grid system, columns widths should sum up to 12, so I'm passing an integer arrayCode: Select all
const dv = AppGiniHelper.DV; var row_01 = dv.addLayout([6, 6]) .add(1, ["text_richtext"]) .add(2, ["int", "float", "double", "decimal"]);
[6, 6]
which creates two columns, 50% width each.
- In next step I am creating a custom tab and adding the whole row to it. This is the complete code:
Code: Select all
const dv = AppGiniHelper.DV; var row_01 = dv.addLayout([6, 6]) .add(1, ["text_richtext"]) .add(2, ["int", "float", "double", "decimal"]); dv.addTab("tabTest", "Tab", null, [row_01]);
- Let's create another row with two columns. I have seen in your code that you are using a different widths-array, which is fine from technical point of view but may be confusing users.
Anyway, here is another row with different widths[7, 5]
instead of[6, 6]
:
In the screenshow I have marked widths:Code: Select all
const dv = AppGiniHelper.DV; var row_01 = dv.addLayout([6, 6]) .add(1, ["text_richtext"]) .add(2, ["int", "float", "double", "decimal"]); var row_02 = dv.addLayout([7, 5]) .add(1, ["text_textarea"]) .add(2, ["varchar", "char"]); dv.addTab("tabTest", "Tab", null, [row_01, row_02]);
Now, when calling
.sizeLabels()
on one of the rows inside the a custom tab (actually, I have never tried it because I have never needed it), it applies to the first column, only. This messes up the layout as you have shown in your screenshot:Code: Select all
row_01.sizeLabels(2);
Here is my recommendation:
- For design reasons I recommend using an identical column-width-array on all rows like
[6, 6]
- Instead of
.sizeLabels()
maybe you should use.wrap()
function on certain text-fields which gives more space for editing
Code: Select all
const dv = AppGiniHelper.DV;
var row_01 = dv.addLayout([6, 6])
.add(1, ["text_richtext"])
.add(2, ["int", "float", "double", "decimal"]);
var row_02 = dv.addLayout([6, 6])
.add(1, ["text_textarea"])
.add(2, ["varchar", "char"]);
dv.addTab("tabTest", "Tab", null, [row_01, row_02]);
dv.getFields(["text_richtext", "text_textarea"]).wrap();
From my point of view this looks quite pretty. I hope this helps.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.14 Revision 1665 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.14 Revision 1665 + all AppGini Helper tools
Re: rich (html) area in custom Tabs
great Jan,
thanks for all your kind and most profesional support.
Shay.
thanks for all your kind and most profesional support.
Shay.