ADH2COB
I'm new here

Get Value from CMS INPUT Field

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
pavone
I'm new here

Hello,

FormData data = pageObj.getFormData();

FormField<?> formField = data.get(masterLang,"fieldName");

Object fieldValue = formField.get();

this approach is correct.

Best regards

Tim

View solution in original post

0 Kudos
2 Replies
pavone
I'm new here

Hello,

FormData data = pageObj.getFormData();

FormField<?> formField = data.get(masterLang,"fieldName");

Object fieldValue = formField.get();

this approach is correct.

Best regards

Tim

0 Kudos

Hello Ajay,

do you need further help or did Tim's reply already answer your question? If so, it would be great if you mark his reply as "correct answer".

Best regards

Michaela

0 Kudos