Page 1 of 1

Bug in the AppGiniFields inline command?

Posted: 2020-10-24 16:51
by paulgai
Hi,
I have a table with name Members and two fields, the field Name (Varchar) and the field Sex (Option Drop-down list with two choices, Male and Female). I use the following command in hooks/Member-dv.js file:

Code: Select all

$j(function(){  
     new AppGiniFields(["Name", "Sex"]).inline("Name", [6, 6]);
});
And I get the following result:
member.jpg
member.jpg (43.1 KiB) Viewed 4217 times
Is this a bug or I do something wrong?
Thank you.

Re: Bug in the AppGiniFields inline command?

Posted: 2020-10-24 17:10
by jsetzer
1) Which Version?
2) please check if you have initialized new AppGiniDetailView() more than once, for example in header-extras AND a 2nd time in TABLENAME-dv.js
You should initialize it once, only
3) any related warnings or errors in console?

If still problems, send zipped header-extras.php and your TN-dv.js by EMAIL (!) to appgini at bizzworxx dot de

Re: Bug in the AppGiniFields inline command?

Posted: 2020-10-24 18:34
by paulgai
1) AppGini Version 5.84, AppGini Helper Javascript Library Version: 2020.04.30.7
2) I did not initialize new AppGiniDetailView(), I used only the above JavaScript code.
3) I do not get warnings or errors in console.
console.jpg
console.jpg (42.92 KiB) Viewed 4203 times
The problem seems to be related to the Drop-down list option field. I tried with two simple text fields and it works fine.
member2.jpg
member2.jpg (47.75 KiB) Viewed 4203 times
I emailed you the files.
Thank you

Re: Bug in the AppGiniFields inline command?

Posted: 2020-10-25 10:12
by jsetzer
I confirm this is a bug in current version.

Gonna fix it next week, hopefully.

And sorry @all for delay of upcoming 2020/10 version. I am trying to fix the bug reported here. It will take a few more days to finalize everything, test and publish the new version.

Re: Bug in the AppGiniFields inline command?

Posted: 2020-10-25 11:03
by jsetzer
Thanks for sending the files!

tl;dr

Code_QaUrGMz083.png
Code_QaUrGMz083.png (6.63 KiB) Viewed 4161 times

Solution
$j(function(){
new AppGiniFields(["Name", "Sex"]).inline("Name", [6, 6]);
});
The function call should NOT be inside document-ready.

see documentation here:
https://appgini.bizzworxx.de/products/j ... ne-fields/)

Just write the function call into your javascript file like this:

Code: Select all

// file: hooks/TABLENAME-dv.js
new AppGiniFields(["Name", "Sex"]).inline("Name", [6, 6]);

This gives pretty aligned controls and no duplicates:

chrome_L0DxatRnaO.png
chrome_L0DxatRnaO.png (7.48 KiB) Viewed 4161 times

Anyway, I am considering taking a closer look at this behavior, also in case others stumble upon the same problem.

[SOLVED] Bug in the AppGiniFields inline command?

Posted: 2020-10-25 14:37
by paulgai
The problem solved.
Thanks!!

Re: Bug in the AppGiniFields inline command?

Posted: 2020-12-18 14:12
by jsetzer
Great! Glad it works as expected!