Get Value from CMS INPUT Field
Author: ADH2COB
Publication Date: 6/18/2014 13:54
Hello
I am doing migration of fsm modules from FS 4.2.488 to FS 5.1.
I have implemented the below code to read the value from a element in page in FS5.1
FormData data = pageObj.getFormData();
FormField<?> formField = data.get(masterLang,"fieldName");
Object fieldValue = formField.get();
My previous implementation in FS 4.2.488 is as below
Data data = pageObj.getData();
DataValue dv = data.get("fieldName");
EditorValue ev = (EditorValue)dv.getEditor();
Object fieldValue = ev.get(lang);
Is the new approach I am following is fine?
Or I have to look for a different approach say getting EditorValue object and using the the EditorValue.get() method.
-
Author: pavone - 6/18/2014 14:58
Hello,
FormData data = pageObj.getFormData();
FormField<?> formField = data.get(masterLang,"fieldName");
Object fieldValue = formField.get();
this approach is correct.
Best regards
Tim
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
1 commentaire