SC 8.1 Way to force the form in desktop mode on the mobile device

Hello to all forum.
There 's a way to force the form in desktop mode on the mobile device.
Thanks for your reply.

One thread is enough … Look at sc_menu_force_mobile(false);

Hello Paul, thanks for your answer, it works only in the menu, I was looking for a command that would work even in the form, to display the form on the Mobile as the Desktop version.
Unfortunately Script Case 8 has many limitations in the mobile version.

Dear multisystems2,

I agreed with your statement about how unfortunate it is that SC8 has too many limitations in the mobile implementation. Until it is improved in future upgrade, we can not really use the mobile version to properly display grid/form on mobile devices. Mobile menu is not that great either but at least it is acceptable.

Anyway, like you I am forced to use the desktop mode (SC7 style) and not the SC8 mobile mode. And I have found a way to force the desktop mode on mobile devices.

Here is how I went about it:

  1. I noted that on mobile device, at the bottom left corner of the screen, there is a link “Display web version”. Clicking on this link will force the web (desktop) mode.

  2. I search for the phrase “Display web version” in the language file (my is in _lib/lang/en_us.lang.php) and found:

$this->Nm_lang[‘lang_version_web’] = “Display web version”;

  1. I searched for the string ‘lang_version_web’ in sec_login application folder and found this session variable

$_SESSION[‘scriptcase’][‘display_mobile’] = true;

(it is found in ‘login_mob_form0.php’ file)

  1. I tested my login form by adding this line:

$_SESSION[‘scriptcase’][‘display_mobile’] = false;

to the “OnApplicationInit” event and voila, problem solved.

Once the session variable ‘display_mobile’ is set to false, all menu, grid and form called from the menu will all be displayed in desktop mode.

Best,

DH

just only a small contribute :

$_SESSION[‘scriptcase’][‘device_mobile’] = false;
$_SESSION[‘scriptcase’][‘display_mobile’] = false;

work fine!

great tip, thanks!

I tried this and upon initial page load, if I have ajax-dependent cascading select fields, I get an error: “Ajax Parameters are invalid.” Once the page is refreshed, it’s fine. SC is loading the mobile version but the session variables are false so the fatal error throws.

On a log in form (sec_Login) the message appears as well.

Anybody have any ideas how to fix this?

hi,

just include this in AppInit event:
$_SESSION[‘scriptcase’][‘display_mobile’] = false;

no need to use this, it’s the one causing the error message.
$_SESSION[‘scriptcase’][‘device_mobile’] = false;

you may remove the ‘Display mobile version’ in the language by leaving it blank instead