Questions tagged [inputfield]

InputField represents an editable input for a field on a Salesforce object based on field type. For example, if fieldName references a date value, then a date field with a date picker is rendered.

Filter by
Sorted by
Tagged with
12
votes
4answers
2k views

Datepicker widget location issue

I have a visualforce page with a standard controller of a custom object, and within the page and inputfield that is tied to a custom date field of said object. I've dropped the VF page into the page ...
9
votes
3answers
4k views

Date input taking into account users time zone offset

I have an input field that is binding to a backing Task in the controller to allow users to enter a date into the ActivityDate field. I'm not interested in any other fields on the Task. I'm just ...
9
votes
4answers
8k views

How to use <force:inputField> and <force:outputField> inside an <aura:iteration>

Here @Peter describes a very cool way to use a <force:inputField ... /> together with <aura:attribute name="YourObjectType" type="YourObjectType" default="{ sobjectType: '...
9
votes
2answers
2k views

New HTML5 Apex:Input issue

I'm trying to use new Input and InputField with type attribute. I need to use the date or datetime type as follow: <apex:input value="{!birthdayDate}" type="date" styleClass="select-box"/> ...
9
votes
3answers
2k views

Does anyone know how to make input work properly on iOS devices in Salesforce1

So iOS has some major bugs with input objects in iFrames, the upshot of which is that if you use input fields in a Visualforce page in the Salesforce1 mobile app, you get to deal with those bugs. If ...
8
votes
2answers
2k views

Avoid expanded focus of first DateTime apex:inputField

I have a Visualforce page that sets the focus to the first apex:inputField when the page is loaded. Being a DateTime this expands out the calendar date picker control and obscures a number of other ...
8
votes
2answers
4k views

Visualforce markup used to display a required password field, with field type “password”

Inside a pageBlock with mode="edit", I'd like to show a required inputField with the type set to "password" instead of "text". When I use inputSecret, even with required="true", it doesn't show the ...
7
votes
1answer
21k views

Create VisualForce input that uses Lookup popup

I have a custom object, Foobar__c, and I would like to create a VisualForce page containing a form in which the user has to select a Foobar__c via the standard Lookup popup for Foobar__c. I would ...
6
votes
4answers
18k views

Lightning:input type=“date”: how to change the date fomat - Summer'18

I'm trying to change date format of this component but I dont find any attribute (like ui:inputDate has) to change the date format. <lightning:input type="date" name="input8" label="Dates" value="...
6
votes
2answers
3k views

How do I get a value from a look up input field?

I am using the apex:actionSupport control to execute some code when the apex:inputField it is associated to, has its value changed. The apex:inputField is a look up field, so it spawns a new window ...
6
votes
1answer
949 views

Lightning currency input component that respects the records IsoCode

I was so used to Visualforce fields that display a currency value in the CurrencyIsoCode of the relevant record that it took me a while to understand why in Lightning wrong Iso Codes (those of the ...
5
votes
2answers
21k views

Easiest way to get a value from a lightning:inputField

I want to get the value from a lightning:inputField, but I can't. Component: <aura:attribute name="myAttribute" type="String"/> {!v.myAttribute} <lightning:recordEditForm objectApiName="...
5
votes
3answers
5k views

<apex:inputfield> without SObject bound

There is any way to create an standard input field on VF without bind it to an SObject field ? I was searching on G unsuccessfully. My approach was something like this: <vapex:inputField label=...
5
votes
1answer
12k views

apex:inputField can only be used with sObjects

I am trying to create a custom visualforce page that saves new opportunity contact roles to an opportunity. I am having trouble creating the first step of listing out all contacts that relate to that ...
5
votes
1answer
1k views

How can I get the field type of an inputfield displayed within a repeat tag?

Background I have a Map of sObjects and a List of API field names (from Custom Settings) to dynamically control the fields that display in a table on a Visualforce page. Here's the Apex to get all ...
5
votes
2answers
610 views

ReRendered form with wrong data on inputFields dependent picklist

I have a Visualforce Page for QuoteLineItem multiple edit. It works as a shopping cart: the top section has the items already in the Quote, and in the bottom there are the available products from the ...
5
votes
1answer
2k views

How to populate picklist values in Lightning Componets according to the metadata definition?

In Visualforce, we didn't thought much about picklist-values (=options) on simple CRUD UIs - they where simply there using an <apex:inputField ... /> Now in Lightning I found this documentation ...
5
votes
1answer
1k views

User input to an array in Visualforce

I have a Visualforce page that collects user input for 125 integer variables that are then used by the controller to create records. I'd rather use an array instead of defining all those variables, ...
5
votes
2answers
289 views

Getting 'multiple items' error despite inputField lookup value being populated with Id in controller

Hello and thanks in advance for any help! I have a VF page with 2 lookup inputFields and a picklist (built as an inputField with dynamically-populated picklist choices). There is an actionsupport ...
4
votes
2answers
3k views

InputField not editable when in Edit Mode

I am rendering a VF page in Customer Portal and hoping to use inputField. Issue is that the field is not showing as editable, this happens when rendered from the portal (as a portal user) and my in my ...
4
votes
4answers
6k views

Problem rendering textarea/inputField/inputTextArea in pageBlockTable ( Internet Explorer 11 only )

We've run into an html rendering issue on a Visualforce page running on Internet Explorer 11. We're nesting an inputField for a Long Text Area field in a pageBlockTable, but when the value for that ...
4
votes
1answer
4k views

Apex InputField value binding error

Why I will get all the time this error? Could not resolve the entity from value binding '{!order.test}'. <apex:inputField> can only be used with SObjects, or objects that are ...
4
votes
1answer
3k views

how to use apex:inputField type of time

According to the docs on apex:inputField: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputField.htm I can use type="time". However when I try this with a date-time field ...
4
votes
1answer
3k views

Visualforce layout prevent component column wrap

I have a Visualforce custom object EDIT page with a controller extension that's used by multiple profiles. I've created a two-column layout by embedding the input fields in an <apex:...
4
votes
1answer
1k views

reCAPTCHA on Visualforce pgage

I've been looking for a way to implement reCAPTCHA or any type of CAPTCHA on a Visualforce form. It appears that reCAPTCHA has been updated since this posted Adding CAPTCHA to Force.com sites. Can ...
4
votes
1answer
3k views

inputfield with type date using twitter bootstrap

I have a page that contain inputField with type (date), And I used bootstrap framework css and turned off the standard style sheet.. but the date field appeared without datepicker and i put type="date"...
4
votes
1answer
1k views

Removing dot (thousands separator) in a numeric apex:inputField

I have one field "MyYear__c" on my custmon object. This field has following details: Data Type: Number Length: 4 Decimal Places: 0 At the visualforce page it looks like this: <apex:inputField ...
4
votes
0answers
983 views

Lightning Components - <force:inputfield> Not working for certain field types?

Is force:inputfield not working for certain field types? I've put together a simple Lightning component I'm finding the following: Picklists - Are rendered as disabled (this is an issue I'm aware of ...
4
votes
1answer
2k views

Controller variables are not retrieving data from bound inputfields

I'm working on an interface that allows users to create activities directly from a list of records of a custom object, so I created a wrapper class that contains said object and a task, in order to ...
3
votes
2answers
5k views

Disabled attribute not present for apex:inputfield. Any alternatives?

Unlike for components such as apex:selectList, apex:inputText etc., apex:inputField doesn't provide a Disabled attribute which is unfortunately exactly what I need right now. Could there be any ...
3
votes
1answer
364 views

Issue in Finding Difference between Date's in LWC

Currently, I want to find a difference between two dates in months in LWC. I am getting a difference as 'Nan'. Here is the playground link Below is the screenshot for your reference
3
votes
1answer
393 views

How to clear the filename and value of apex:inputFile

I have and apex:inputFile tag where a user can input a filename to upload on a visualforce page. I have a javascript function which checks and alerts if a filesize is too large. After the Alert the ...
3
votes
2answers
2k views

Disabling apex:inputField component with html passthrough attribute

I'm getting the input using <apex:inputField> (must be inputField rather than inputText to enforce FLS). The disabled attribute is not supported for the <apex:inputField> tag, so I'm ...
3
votes
2answers
2k views

How to add lightning:input to lightning:recordEditForm

I'm building out a question answer component where certain answers will have specific input types and it would be nice to set some key parameters of the input field yet still use the lightning:...
3
votes
4answers
10k views

Default Values in Visualforce Input Fields

This is one of the feature that was delivered "Winter 11" but looks like there are some limitation. The suggested feature seems to work only for the very first time when VF page loads but when a ...
3
votes
1answer
6k views

Difficulty with apex:param and apex:actionsupport

Trouble with Action Support Currently, I have been very successful with my page until I ran into a snag with my action:support tag. I simply need to collect an Id, collected on the a form, then ...
3
votes
1answer
310 views

Set Two Different Values for the same field in a vf page via controller extension?

I am creating a visual force page where a user can log a completed task and set up a new one. I'd like to set default values for the Status to New for one section and Complete for the other. Is ...
3
votes
1answer
360 views

Is there a way in Lightning to get a dynamic input type like <apex:inputField /> in VF

In Visualforce I loved it not to think about types of input-fields and go instead totally blind with an <apex:inputField ... /> letting the platform bother if a field is a textfield, checkbox, ...
3
votes
3answers
1k views

Show validation rule error next to the multiple field

The below validation rule works fine but I'm curious to know how can I show the required error message next to the field? As you can see below I have multiple fields and I have selected to show the ...
3
votes
1answer
2k views

reset lightning:input type number

I have one input field type number <lightning:input type="number" aura:id="userId" name="userId" label="User Id" value="{!v.MyUser.userid__c}" required="true" maxlength="10"/> After my ...
3
votes
2answers
739 views

Validation rule to pass a Value to a text field by validating another text field

I am having two textfields consider A and B. When i enter a value for B, the corresponding value should be passed in Field A. FOR EXAMPLE : Field A is Dependant on Field B Values IF Field A IS ...
3
votes
1answer
1k views

Issues saving apex:inputfield values to object in controller. Only last field on form saves value

Here's my issue: As per code below, I am trying to display a number of fields dynamically and then allow the user to enter values and save the record (or update it if they are viewing an existing ...
3
votes
1answer
6k views

onchange event is not triggered when clear an input field

I am invoking a look up field as an input field in my visual force page. Upon the selection or clearing of the value on the look up field, I want to update another part of the page. Here comes a code ...
3
votes
0answers
2k views

Lightning Components: Using <force:inputField /> on a Lookup only works partly and use slds-input class override with default

Using a <force:inputField value="{!v.account.ParentId}" /> seems to have flaws running in a Lightning Community Issues Rendering: wrong/missing styles Link "Find more results" does not work ...
2
votes
2answers
730 views

Is there a Lightning component for inputRichText - with image upload?

I'm looking for a lightning component that I can use that has the image upload capability. Similar to the Chatter WYSWG: Note: I've used the lightning:inputRichText (Beta) and that doesn't have the ...
2
votes
4answers
6k views

Prefill visualforce inputfield from URL parameter without custom controller

Prefilling fields is easy on standard edit pages via an URL parameter, like .../a0B/e?Name=MyNameValue Doing this on a visualforce page does not work without custom controllers, or is there a way? ...
2
votes
1answer
3k views

RecordEditForm: Reset inputfield after successful submit

I have a Lightning RecordEditForm on a page that I'd like use multiple times. After a successful submit I want to clear the user's entries to allow the form to be reused. I have been unsuccessful at ...
2
votes
2answers
2k views

Uploading from SF to AWS S3: upload works but all files are empty

I've made a file uploader from SF to AWS S3. Everything works as expected except for the fact that the file itself in S3, despite its size reading correctly, is empty: public pageReference ...
2
votes
3answers
17k views

Input field to accept only numbers and the number can start with 0

I want the input field to only allow numbers and the number can start with 0 also. I tried using ui:inputNumber but when i click on check button for validation of input it deletes the 0 from start. ...
2
votes
1answer
836 views

What is the best way to mask Visualforce Inputfield?

Below is one way that we can do masking on input fields. Including below in apex page. <apex:includeScript value="{!$Resource.jquery}"/> <apex:includeScript value="{!$Resource.jMaskedInput}"/...

1
2 3 4 5