Hide the Title field and populate it with multiple line field

What I am trying to do is simple I think. I have a form with only three fields: Title, Product, and Feedback.

I have the Title field on the form but display: none.

In the Javascript I have:

fd.spSaved(function(result) {
fd.field(‘Title’).value = fd.field(‘Feedback’).value;
$(fd.field(‘Title’).$parent.$el).show();
});

I am turning on the Title with $(fd.field(‘Title’).$parent.$el).show(); as most browsers do not submit a hidden field.

The form isn’t saving.

What do I need to change?

Thank you

I found the following post and tried applying these changes:

I moved my code to the OnClick of the Save button:

fd.spSaved(function(result) {
fd.field('Title').value = fd.field('Feedback').value;
$(fd.field('Title').$parent.$el).show();
});

fd.save();

Notice I added the fd.save();

It still didn't work.

I made the Title field visible and modified the code in the OnClick to:

fd.field(‘Title’).value = fd.field(‘Feedback’).value;

fd.save();

I get a return error message that “You must specify a value for this required field.” for the Title field.

All I want to do is populate the Title field with the first 255 characters of the Multiple Line field.

Ok, I got it to work with the following:

var memo = fd.field(‘Feedback’).value();

fd.field(‘Title’).value(memo.substr(1, 250));

fd.save();

Thank you

My only issue now is how to hide the Title field and make sure it posts back on the form save.

I have it working and no longer need any help. Thank you.

Dear Marion,
Glad to hear that! In case if anyone wonders about the code to hide a field, this should work:
$(fd.field('Title').$parent.$el).hide();