Appgini Helper - Inline Fields
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Appgini Helper - Inline Fields
Just playing with Jan's Appgini Helper. I cant get the Inline Fields to work. I maybe just missing the point somewhere, but instead of seeing two fields in one line, they both just disappear completely from detail view. I've copied the code from documentation and created the two fields last_name & first_name as in there just for testing, but they both just goes after code applied on tablename-dv.js I did check the console for errors and got this:
Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child element contains the parent.
at HTMLDivElement.<anonymous> (http://localhost/portal/resources/jquer ... js:3:22901)
at Ha (http://localhost/portal/resources/jquer ... js:3:21075)
at n.fn.init.append (http://localhost/portal/resources/jquer ... js:3:22791)
at n.fn.init.n.fn.<computed> [as appendTo] (http://localhost/portal/resources/jquer ... js:3:24510)
at _0x87fa77._0x5a4d82.inline (http://localhost/portal/hooks/AppGiniHe ... s:6:157421)
at http://localhost/portal/hooks/vehicle_check-dv.js:11:48
Any help?
Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child element contains the parent.
at HTMLDivElement.<anonymous> (http://localhost/portal/resources/jquer ... js:3:22901)
at Ha (http://localhost/portal/resources/jquer ... js:3:21075)
at n.fn.init.append (http://localhost/portal/resources/jquer ... js:3:22791)
at n.fn.init.n.fn.<computed> [as appendTo] (http://localhost/portal/resources/jquer ... js:3:24510)
at _0x87fa77._0x5a4d82.inline (http://localhost/portal/hooks/AppGiniHe ... s:6:157421)
at http://localhost/portal/hooks/vehicle_check-dv.js:11:48
Any help?
Re: Appgini Helper - Inline Fields
Can you please post the code of vehicle_check-dv.js and give more information on the field names you are trying to put inline. A screenshot would also be helpful.
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Re: Appgini Helper - Inline Fields
Hi Jan, the code is pretty much copy and paste of yours in documentation. All I have done I replaced your field names with mine. It is definitely hits the page some how, as both of the fields that are in the code just disappear from detail view.
// syntax:
// new AppGiniFields( fieldname[] ).inline( label, width[] );
// simple example
// automatic sizing
new AppGiniFields(["Interior_Trim", "Seat_Belts"]).inline("Name");
// example with explicit sizing
new AppGiniFields(["Interior_Trim", "Seat_Belts"]).inline("Name", [6, 6]);
// long example
var fieldnames = ["Interior_Trim", "Seat_Belts"];
var widths = [6, 6];
var label = "Name";
new AppGiniFields(fieldnames).inline(label, widths);
That's all I have in vehicle_check-dv.js file. Both fields are set as VerChar in Appginni.
// syntax:
// new AppGiniFields( fieldname[] ).inline( label, width[] );
// simple example
// automatic sizing
new AppGiniFields(["Interior_Trim", "Seat_Belts"]).inline("Name");
// example with explicit sizing
new AppGiniFields(["Interior_Trim", "Seat_Belts"]).inline("Name", [6, 6]);
// long example
var fieldnames = ["Interior_Trim", "Seat_Belts"];
var widths = [6, 6];
var label = "Name";
new AppGiniFields(fieldnames).inline(label, widths);
That's all I have in vehicle_check-dv.js file. Both fields are set as VerChar in Appginni.
Re: Appgini Helper - Inline Fields
If this is your code, if will fail, because you inline your fields (line 6) and then try it again two more times (in lines 9 and 15). This will not work because after the first inline-call, the fields have already been moved to their new location. They are NOT at their original place any more afterwards, so your second and third call will fail.// syntax:
// new AppGiniFields( fieldname[] ).inline( label, width[] );
// simple example
// automatic sizing
new AppGiniFields(["Interior_Trim", "Seat_Belts"]).inline("Name");
// example with explicit sizing
new AppGiniFields(["Interior_Trim", "Seat_Belts"]).inline("Name", [6, 6]);
// long example
var fieldnames = ["Interior_Trim", "Seat_Belts"];
var widths = [6, 6];
var label = "Name";
new AppGiniFields(fieldnames).inline(label, widths);
Please use this...
Code: Select all
new AppGiniFields(["Interior_Trim", "Seat_Belts"]).inline("Name");
You only need to call the inline()-function once. There are three examples in the code which you have copied and pasted. Please use only one of them, not all. It is up to you, which variant you like the most. Personally I love efficient short code. Others like more variables for better readability.
Hope this was the only bug!
Best,
Jan
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Re: Appgini Helper - Inline Fields
Oh Dear Thanks Jan.. The documentations isn't very 'Begginer Friendly' , but glad you are always around to help
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Re: Appgini Helper - Inline Fields
I mean 'Beginner'..
Re: Appgini Helper - Inline Fields
Thanks for pointing that out!!!aarlauskas wrote: ↑2020-02-23 10:27Oh Dear Thanks Jan.. The documentations isn't very 'Begginer Friendly'
Actually I did not expect anyone using those three examples in one file all at the same time without commenting out parts of it
I'm still learning something new every day!
Anyway: I am going to update the sample code immediately.
Best,
Jan
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
Re: Appgini Helper - Inline Fields
Done:
https://appgini.bizzworxx.de/products/j ... ne-fields/
I hope this is better now! If there is anything which I can improve, feel free to contact me.
Best,
Jan
https://appgini.bizzworxx.de/products/j ... ne-fields/
I hope this is better now! If there is anything which I can improve, feel free to contact me.
Best,
Jan
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
- aarlauskas
- Veteran Member
- Posts: 127
- Joined: 2019-04-28 18:03
- Location: Medway, UK
Re: Appgini Helper - Inline Fields
Nice one Buddy. Thank You!
Re: Appgini Helper - Inline Fields
Jan,
Inline fields working great for me. Thanks
Anyway to add a label to the other fields?
Original
Last Name: _______________________________________________________
First Name:_______________________________________________________
With Inline Fields
Name: ___________________________________________________________ __________________________________________________
My Hope
Last Name:_______________________________________________________ First Name:_________________________________________
Thanks
Inline fields working great for me. Thanks
Anyway to add a label to the other fields?
Original
Last Name: _______________________________________________________
First Name:_______________________________________________________
With Inline Fields
Name: ___________________________________________________________ __________________________________________________
My Hope
Last Name:_______________________________________________________ First Name:_________________________________________
Thanks
Re: Appgini Helper - Inline Fields
Hi,
have a look, please. I guess this is what you are looking for:
The columns Street, c/o, Floor, Postcode, City and Country are all inline [12, 12, 12, 3, 9, 12] and the labels are right before the fields.
I have been working on this recently. It's not easy to implement but I'm getting closer. Stay tuned, this may be BETA-function in upcoming April 2020 version of AppGini Helper Javascript Library.
Do you like it?
Take care,
Jan
have a look, please. I guess this is what you are looking for:
The columns Street, c/o, Floor, Postcode, City and Country are all inline [12, 12, 12, 3, 9, 12] and the labels are right before the fields.
I have been working on this recently. It's not easy to implement but I'm getting closer. Stay tuned, this may be BETA-function in upcoming April 2020 version of AppGini Helper Javascript Library.
Do you like it?
Take care,
Jan
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
Re: Appgini Helper - Inline Fields
Yes, thanks....
That is what I would like to do....
I'll wait until April, in the meantime can the field name be displayed in the field (greyed out)
Thanks for your response.
Jim
That is what I would like to do....
I'll wait until April, in the meantime can the field name be displayed in the field (greyed out)
Thanks for your response.
Jim
Re: Appgini Helper - Inline Fields
You may have a look at the .placeholder()-function:
https://appgini.bizzworxx.de/products/j ... ceholders/
Best,
Jan
https://appgini.bizzworxx.de/products/j ... ceholders/
Best,
Jan
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
Re: Appgini Helper - Inline Fields
That sir, Solves my problem!!!
Thanks once again!!
Thanks once again!!
Re: Appgini Helper - Inline Fields
Anyone see what my placeholder will not work?
Everything else works
new AppGiniField("Contract_Date") .placeholder("Contract Date");
var dv = new AppGiniDetailView();
dv.addGroup("grp_Basic_Information", "Basic Information", ["Name", "Offical_Project_Title", "Contact_Name", "Phone_Office", "Contact_Phone_Cell", "Client_Website", "Email", "Address", "City", "State", "Zip","Location"]);
dv.addGroup("grp_staffing", "Project Information", ["PM", "Project_Type","Status"]);
dv.addGroup("grp_calendar", "Calendar", ["Contract_Date", "StartDate","Date_of_Data_Request","Date_All_Data_Received","EndDate", "Actual_end_date", "Time_Left"]);
dv.addGroup("grp_Project_Documents", "Project Documents", ["Client_Folder", "ESCI_Folder","Contract","Final_SOW","Original_RFP"]);
new AppGiniField("Contract_Date") .placeholder("Contract Date");
new AppGiniField( "Contract_Date" ).toDatepicker();
new AppGiniField( "StartDate" ).toDatepicker();
new AppGiniField( "Date_of_Data_Request" ).toDatepicker();
new AppGiniField( "Date_All_Data_Received" ).toDatepicker();
new AppGiniField( "EndDate" ).toDatepicker();
new AppGiniField( "Actual_end_date" ).toDatepicker();
new AppGiniFields(["Contract_Date", "StartDate"]).inline("Project Begin Dates")
new AppGiniFields(["Date_of_Data_Request", "Date_All_Data_Received"]).inline("Dates for Data")
new AppGiniFields(["EndDate", "Actual_end_date"]).inline("Project End Dates")
Thanks
Jim
Everything else works
new AppGiniField("Contract_Date") .placeholder("Contract Date");
var dv = new AppGiniDetailView();
dv.addGroup("grp_Basic_Information", "Basic Information", ["Name", "Offical_Project_Title", "Contact_Name", "Phone_Office", "Contact_Phone_Cell", "Client_Website", "Email", "Address", "City", "State", "Zip","Location"]);
dv.addGroup("grp_staffing", "Project Information", ["PM", "Project_Type","Status"]);
dv.addGroup("grp_calendar", "Calendar", ["Contract_Date", "StartDate","Date_of_Data_Request","Date_All_Data_Received","EndDate", "Actual_end_date", "Time_Left"]);
dv.addGroup("grp_Project_Documents", "Project Documents", ["Client_Folder", "ESCI_Folder","Contract","Final_SOW","Original_RFP"]);
new AppGiniField("Contract_Date") .placeholder("Contract Date");
new AppGiniField( "Contract_Date" ).toDatepicker();
new AppGiniField( "StartDate" ).toDatepicker();
new AppGiniField( "Date_of_Data_Request" ).toDatepicker();
new AppGiniField( "Date_All_Data_Received" ).toDatepicker();
new AppGiniField( "EndDate" ).toDatepicker();
new AppGiniField( "Actual_end_date" ).toDatepicker();
new AppGiniFields(["Contract_Date", "StartDate"]).inline("Project Begin Dates")
new AppGiniFields(["Date_of_Data_Request", "Date_All_Data_Received"]).inline("Dates for Data")
new AppGiniFields(["EndDate", "Actual_end_date"]).inline("Project End Dates")
Thanks
Jim
Re: Appgini Helper - Inline Fields
- Are there any error messages in the console tab of your browser's dev-tools?
- Can you please remove the .toDatepicker call on that field for testing purposes.
- You are executing the .toPlaceholder function twice
- Well this will not be the reason, but I've noticed blanks which should be removed
- I'd like to recommend chaining technique instead of initializing the same field a couple of times.
Code: Select all
// ...
new AppGiniField("Contract_Date") .placeholder("Contract Date");
var dv = new AppGiniDetailView();
new AppGiniField("Contract_Date") .placeholder("Contract Date");
new AppGiniField( "Contract_Date" ).toDatepicker();
new AppGiniFields(["Contract_Date", "StartDate"]).inline("Project Begin Dates")
// ...
Code: Select all
// ...
var dv = new AppGiniDetailView();
new AppGiniField("Contract_Date")
.placeholder("Contract Date")
.toDatepicker();
new AppGiniFields(["Contract_Date", "StartDate"]).inline("Project Begin Dates")
// ...
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
Re: Appgini Helper - Inline Fields
I'll try that
Thanks
Thanks
Re: Appgini Helper - Inline Fields
Still no error, but no place holder either??????
new AppGiniField( "StartDate" )
.placeholder("Start Date")
.toDatepicker();
new AppGiniField( "EndDate" )
. placeholder("End Date")
.toDatepicker();
new AppGiniFields(["StartDate", "EndDate"]).inline("Start Date - Due Date")
new AppGiniField( "StartDate" )
.placeholder("Start Date")
.toDatepicker();
new AppGiniField( "EndDate" )
. placeholder("End Date")
.toDatepicker();
new AppGiniFields(["StartDate", "EndDate"]).inline("Start Date - Due Date")
Re: Appgini Helper - Inline Fields
Sir, you have changed your settings and you are posting a different scenario than before. That makes it hard to help you on a specific problem.
Your first post was about "Contract_Date" field and now you have posted completely different code with fields "Start Date" and "EndDate". Also still (or again) you are calling .toDatepicker(). I have asked NOT to call this for testing purposes.
We have to narrow down and eliminate possible errors.
Are you able to just test...
... and post your code and the result. Nothing else, just that line of code in hooks/YOURTABLENAME-dv.js. No other code. And please ensure spelling of Contract_Date and that Contract_Date is a varchar or datetime field. If this is for example a date-field, there is no placeholder functionality.
Sorry, I really want to help you but I need exact information.
Best,
Jan
Your first post was about "Contract_Date" field and now you have posted completely different code with fields "Start Date" and "EndDate". Also still (or again) you are calling .toDatepicker(). I have asked NOT to call this for testing purposes.
We have to narrow down and eliminate possible errors.
Are you able to just test...
Code: Select all
new AppGiniField("Contract_Date").placeholder("Start Date");
Sorry, I really want to help you but I need exact information.
Best,
Jan
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
Re: Appgini Helper - Inline Fields
Sorry,....
I do appreciate your help.
This from my project.dv.js file
new AppGiniField("Contract_Date").placeholder("Start Date");
No place holder on the page.
Just FYI
Yesterday I inserted the .placeholder function on another page and it worked fine, in fact, when I deleted the code it kept working!
Thanks for all your help....
Jim
I do appreciate your help.
This from my project.dv.js file
new AppGiniField("Contract_Date").placeholder("Start Date");
No place holder on the page.
Just FYI
Yesterday I inserted the .placeholder function on another page and it worked fine, in fact, when I deleted the code it kept working!
Thanks for all your help....
Jim
Re: Appgini Helper - Inline Fields
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
Re: Appgini Helper - Inline Fields
Sorry,
The name was correct, (project-dv.js)
I typed it wrong in the message.
Contents:
new AppGiniField("Contract_Date").placeholder("Start Date");
No placeholder shown.
Thanks!!
The name was correct, (project-dv.js)
I typed it wrong in the message.
Contents:
new AppGiniField("Contract_Date").placeholder("Start Date");
No placeholder shown.
Thanks!!
Re: Appgini Helper - Inline Fields
Silly question, I'm sorry, just to be 100% sure:
Are you reloading the browser page without caching? I had to learn that some developers are just hitting F5 or just clicking the refresh button of their browser and don't see the expected results. Please always clear cache after you have modified CSS of Javascript files to avoid old and outdated code in your broser. There are keyboard shortcuts for all browsers. I recommend getting used to this. See also: https://appgini.bizzworxx.de/support/troubleshooting/
Please note
If this does not help, can you please tell us which datatype Contract_Date is. It should be one of the following datatypes which support placeholders:
Are you reloading the browser page without caching? I had to learn that some developers are just hitting F5 or just clicking the refresh button of their browser and don't see the expected results. Please always clear cache after you have modified CSS of Javascript files to avoid old and outdated code in your broser. There are keyboard shortcuts for all browsers. I recommend getting used to this. See also: https://appgini.bizzworxx.de/support/troubleshooting/
Please note
- There is the .placeholder() function
This will work for "normal" input fields and for datetime fields (which actually ARE inputs).
It will not work for other datatypes like radio buttons or checkboxes or embedded YouTube Videos, obviously, or many other controls which do not support placeholder functionality.
Apart from this - There is the .inline() function which moves various controls into a block of single or multiple lines. During this, the labels of each individual control will be removed. And if this control supports placeholders, the label's text will be taken as placeholder automatically. This also applies to text/number inputs and datetime, perhaps a few more.
If this does not help, can you please tell us which datatype Contract_Date is. It should be one of the following datatypes which support placeholders:
- varchar
- numeric types
- datetime
- all text types, I'm not 100% sure about text datatype with Richtext option
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.10 Revision 1579 + 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.10 Revision 1579 + all AppGini Helper tools
Re: Appgini Helper - Inline Fields
As always Thanks
I will try these things....
Jim
I will try these things....
Jim