You need to sign in to do that
Don't have an account?

Get input field values using Jquery
Hi There ,
iI need to get the all the input field values form the visualforce page.
<apex:inputField value="{!UpdateAllRecord[fieldName]}"
required="false"
styleClass="updateAllInput"/>
I was able to first value using below line
var inputvalue=jQuery("input.updateAllInput").val();
I was trying to get all the values using but I am not getting
$("input.updateAllInput").each(function(){
var input = $(this); //
});
Can any one suggest me what is wrong with my jQuery
Requirement is get all the input fields, is any one one othe input field is having value then display some confirmation message.
iI need to get the all the input field values form the visualforce page.
<apex:inputField value="{!UpdateAllRecord[fieldName]}"
required="false"
styleClass="updateAllInput"/>
I was able to first value using below line
var inputvalue=jQuery("input.updateAllInput").val();
I was trying to get all the values using but I am not getting
$("input.updateAllInput").each(function(){
var input = $(this); //
});
Can any one suggest me what is wrong with my jQuery
Requirement is get all the input fields, is any one one othe input field is having value then display some confirmation message.
var str = jQuery('.updateAllInput').val();
What do you want to do with the value from the input? And how is UpdateAllRecord declared in the controller?
I need to get all the values of input field and check whether each field is having value if it has display some message to user
/**
* List of fields that can actually be edited.
*/
public string[] getFieldNamesEditable() {
if (mFieldNamesEditable == null) {
mFieldNamesEditable = new string[0];
Map<string, Schema.SObjectField> fieldMap = Schema.SObjectType.UW_Rating_Products__c.fields.getMap();
for (string fieldName : getFieldNames()) {
if (fieldMap.get(fieldName).getDescribe().isUpdateable()) {
mFieldNamesEditable.add(fieldName);
}
}
}
return mFieldNamesEditable;
}
/**
* This record is used to collect input from the user for an update all operation.
*/
public UW_Rating_Products__c getUpdateAllRecord() {
if (mUpdateAllRecord == null) {
mUpdateAllRecord = new UW_Rating_Products__c();
for (string fieldName : getFieldNamesEditable()) {
mUpdateAllRecord.put(fieldName, null);
}
mUpdateAllRecord.UNUM_QUOTE_ID__c = getQuote().Id;
}
return mUpdateAllRecord;
}
<apex:inputField value="{!UpdateAllRecord[fieldName]}"
required="false"
styleClass="updateAllInput"/>
please find the below screen short of fields
so i need to get all the values form the input fields by using JQuery.