Display Regular or Mobile Form Based on User Agent?

  • 1
  • Question
  • Updated 4 years ago
Hey guys, 

I'm planning on making 1 contact field for mobile phones and 1 for regular browsers. 

I'm wondering if Skuid has any built in detection code that will check the user agent and display the appropriate form based on if the user is on mobile etc. 
Photo of Chris Hayes

Chris Hayes

  • 120 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I assume you mean 1 contact page for mobile and 1 contact page for regular browsers? 

We have not implemented any feature in our page assignments that would send users to different pages based on whether they were on  a mobile device or not.  We've talked about it,  but not completed it. 

However if you use the Salesforce1 app - you can expose a different set of tabs in the navigation of that app than you do in the browser.  These tabs can be overriden with Skuid pages so that you can have a device specific experience.

 
Photo of Chris Hayes

Chris Hayes

  • 120 Points 100 badge 2x thumb
Hi Rob, 

I was looking for a script that would change which contact form people see in the sidebar based on if they are using a mobile device. I don't really want to show a completely different page, just a different contact form with slightly different styling.

I found a script that works really well, just in case anyone stumbles across this in the future and needs it check here: 

http://pastebin.com/1jkaMm2h

It doesn't have all the mobile user agents but they can easily be added in.

Cheers,
 
-Chris