< Back

Document Subject: XPages button or link not working in iphone ipad android on form
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#richtextXpages or http://A555F9/nn.nsf/ByAlias/richtextXpages

We made a nice form that worked in all browsers.

Tried it in iphone and android and ipad , and it didn't work.

The error coming up in the iphone browser with error console one was TypeError: 'undefined' is not an object

This was due to the rich text widget breaking the form.




To solve this this is what we did:

In the rich text control set this in rendered:

if(context.getUserAgent().getUserAgent().match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i)) {
 return false;
} else {
 return true;
}

 

then add a multi line edit box mapped to the same field in the underlying form and

set rendered to this:

if(context.getUserAgent().getUserAgent().match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i)) {
 return true;
} else {
 return false;
}

 

Nice.