I´m building a simple visual force page that is showed only if user get access to Salesforce with Salesforce1 mobile Application.

I´m having problems with the picklist:

<apex:inputField styleclass="sf1input" value="{!Deal_Row__c.Forecast_Period__c}" />

It looks good but selection is not working,not able to select value and close selection pop up. enter image description here

From Salesforce 1 documentation " Using apex:inputField is fine for fields that display as a basic input field, like text, email, and phone numbers, but avoid using it for field types that use an input widget, such as date and lookup fields." and apex:selectList isn´t supported.

How can i render a working picklist selection in SF Mobile1?

Is there some HTML5 tag to do this?

Thanks in advantage for any advice.

  • I am also stuck with the same problem. We are not supposed to use <apex:form>, <apex:inputfield> tags for the Salesforce1 VF Pages because they increase the view state. Have you got any solution of this problem? I am also looking for a work around for the Lookup field for SF1 VF Pages. – Gaurish Oct 20 '14 at 12:19
  • This task is on pending.When i ll continue with this i will first try with <apex:input> docs.releasenotes.salesforce.com/en-us/winter14/release-notes/…. This tag should be totally supported. If you get it working please add your solution as answer.Thanks. – Enry Oct 21 '14 at 8:20

Salesforce1 have a natural behaviour of closing picklist popup when selected. But it seems that your custom visualforce page is preventing this behaviour.

Here is the working example using opportunity "Stage" field. You can use <apex:inputfield>

<apex:form >
        <apex:outputLabel styleclass="sf1label required" value="This is a label*" />  
        <apex:inputField styleclass="sf1input" value="{!opp.AccountId}" />
        <apex:inputField styleclass="sf1input" value="{!opp.Name}" />

        <apex:inputField styleclass="sf1select" value="{!opp.StageName}" />
        <apex:outputLabel styleclass="sf1label required" value="Is Salesforce1?" />
        <input class="sf1input" type="checkbox"></input>
        <apex:commandbutton styleclass="sf1button" action="{!dummyAction}" value="Command Button"/>
        <apex:commandbutton styleclass="sf1buttonSFBlue" action="{!dummyAction}" value="Command Button Blue"/>
        <button class="sf1buttonSFBlue">Normal Button</button> 
        <apex:repeat value="{!oppList}" var="op">
             <li class="sf1List">
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.