I need to replace following visualforce code block which is used to input a String variable in my visualforce page with <apex:input>


<div class="slds-col">
                                <div class="slds-form-element slds-m-top--medium slds-m-horizontal--medium">
                                    <div class="slds-form-element__control slds-input-has-icon slds-input-has-icon--left slds-m-around--medium">
                                        <svg aria-hidden="true" class="slds-input__icon slds-icon-text-default">
                                            <use xlink:href="{!URLFOR($Resource.SLDS103,'/assets/icons/utility-sprite/svg/symbols.svg#search')}"></use>
                                        <input id="number" value="{!checkNumber}" class="slds-input" type="text" placeholder="Check Number"/>


public String checkNumber { get; set; }
  • What is your question? Did you try writing your form with <apex:input>?
    – David Reed
    Jun 17, 2019 at 11:36

1 Answer 1


Use below code instead of HTML

<apex:input id="number" value="{!checkNumber}" Styleclass="slds-input" html-placeholder="Check Number"/>

Hope this helps !!

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.