0

Firstly, is it possible to enter the HTML-placeholder dynamically? ({!object.name})

I have an input field on a Visualforce page, to enter a new account name. There is a non-related object called label.

I would like to use a label record name as the HTML-placeholder value, for instance...

VF:

<apex:inputField id="label1" html-placeholder="{!label1.name}" value="{!addAccount.name}"/>

APEX:

label1 = [
SELECT
country__c,
id,
name
WHERE country__c = :thisAccount.Country__c];

I understand that this is not the correct apex syntax etc. but it should illustrate the point...

Thanks

1 Answer 1

1

According to the docs "Pass-through attributes aren’t supported in dynamic Visualforce."

If you are not able to set it dynamically you can always use javascript to set it on page load!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .