Forum Discussion
GeoffreyHarmuth
7 years agoQrew Captain
So this happens all across my form (with 180 fields). It changes based on screen size, the browser zoom, the fields surrounding it, different field types, and for any other apparent reason that i don't know about.
I just don't understand the logic behind quickbase's algorithm for resizing and lining up fields - Surely they can make it easier. The view is different for view/print/edit modes as well - Why???
I just don't understand the logic behind quickbase's algorithm for resizing and lining up fields - Surely they can make it easier. The view is different for view/print/edit modes as well - Why???
- _anomDiebolt_7 years agoQrew EliteIt is not a simple problem to get acceptable display under all conditions. I am sure there is a solution for any particular case but you will have to direct you question to support for a general solution or some levers you could pull to control the width.
- JoshuaTate7 years agoQrew CadetI also find this irritating, i was going to ask support at some point but so far honestly support has been a waste of time as there answer for 95% of things is, it can be done with scripting, we encourage you to talk with one of our partners etc....
- _anomDiebolt_7 years agoQrew Elite> it can be done with scripting
I was in a dead sleep but my robot caught this message and woke me up.
I would have to see an instance of this to debug. It might be as simple as injecting a single CSS: property:
white-space: nowrap; - JoshuaTate7 years agoQrew Cadeti like this robot of yours.... below are 2 fields where this happens. this happens alot more but 2 examples from the same tab (i have no wrapping set everywhere i can see)
- JoshuaTate7 years agoQrew CadetUpon your suggestion I have looked at the element ID for the status response, identifies as "tdf_0", in console I have set per below and was successfully applied:
document.getElementById("tdf_0").style.whiteSpace = "nowrap";
now shows as:
Can you please help me out with what I need to do in IOL to get this to occur when the form is opened?, do I just need to write it under the if the form is DR then the code above etc?
Once we have the solution I will go through and get the element Id's for all the fields affected and set them accordingly - even better Quickbase should do this by default.... - JoshuaTate7 years agoQrew CadetI add this to module.js on its own and it has worked, good enough for tonight - moving on for now. Will need to look at an easier way of just setting all elements to no wrap regardless of page type...
document.getElementById("tdf_0").style.whiteSpace = "nowrap"; - _anomDiebolt_7 years agoQrew EliteYou are starting in the correct place - the dev tools console. All my work starts in the dev tools to figure out what needs to be changed and I use every shortcut and trick imaginable to do it as fast as possible. In the console you can
- inspect Elements (Elements tab)
- edit Sources , run Snipptes, set Local Overrides (Sources tab)
- execute JavaScript (Console Tab)
- Inspect Network traffic (Network tab)
- interrogate Service Workers and, examine Storage (Application tab)
Here is one way to change all <td>'s that have an id that starts with "tdf" to have have the nowrap attribute:$("td[id^=tdf]").css("whiteSpace", "nowrap");
This jQuer code just changes two specific tds:$("td#tdf_0, td#tdf_1").css("whiteSpace", "nowrap");
I didn't actually test this code because I am again fast asleep but you will quickly get the hang of it after poking around in the console.
To package the code for IOL you have to take the essential code you developed in the console and wrap it in the generic module.js code:(function(){
//$("img[qbu=module]").remove();
//$("img[qbu=module]").hide();
var dbid = "";
var dbidTable = "";
var dbidInvoices = "bmf5dp7g5";
var apptoken = "";
$.ajaxSetup({data: {apptoken: apptoken}});
var querystring=document.location.search;
if (/dlta=mog/i.test(querystring)) {
//GRID EDIT PAGE ========================================
alert("You are on the Grid Edit Page");
} else if(/a=er/i.test(querystring)) {
//EDIT RECORD PAGE ========================================
alert("You are on the Edit Record Page");
} else if (/a=API_GenAddRecordForm/i.test(querystring)) {
//API_GenAddRecordForm PAGE ========================================
alert("You are on the GenAddRecordForm Page!");
} else if (/a=GenNewRecord/i.test(querystring)) {
//ADD RECORD PAGE ========================================
alert("You are on the Add Record Page");
} else if (/a=nwr/i.test(querystring)) {
//ADD RECORD PAGE ========================================
alert("You are on the Add Record Page");
} else if(/a=dr/i.test(querystring)) {
//DISPLAY RECORD PAGE
alert("You are on the Display Record Page");
$("img[qbu=module]").closest("td").css("background-color","#FFFFFF");
} else if(/a=q/i.test(querystring)) {
//REPORT PAGE ========================================
alert("You are on the Report Listing Page");
} else if(/a=td/i.test(querystring)) {
//TABLE DASHBOARD PAGE ========================================
alert("You are on the Table Dashboard Page");
} else if (/a=FinishEditRecord/i.test(querystring)) {
//FINISH EDIT RECORD PAGE ========================================
alert("You are on the Finish Edit Record Page");
} else if (/a=API_GenAddRecordForm/i.test(querystring)) {
//API_GenAddRecordForm ========================================
alert("You are on the API_GenAddRecordForm Page");
} else {
//OTHER PAGE ========================================
alert("You are on the Some Other Page");
}
})(); - JoshuaTate7 years agoQrew CadetThank you kindly - I will put on my to-do list and let you know when done and if I needed to change anything / how I went. as always really appreciate your wisdom. Back to sleep for you! lol, we cant have the lord of Java tired ;)
- _anomDiebolt_7 years agoQrew EliteActually I am working in Haskell on project having nothing to do with QB.
- GeoffreyHarmuth7 years agoQrew CaptainIt seems the solution is slightly more complicated than i imagined. Is there any way this solution can be broken into a few steps so it can be implemented by a layman such as myself? Also, does this affect the print view as well?