cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Alfresco.forms.Form javascript object

orichaud
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to create a simple form backed by Javascript component. I use an instance of Alfresco.forms.Form to post my form.
My question is really simple and lmight even look dummy: why don't I see all the parameters of the form but only a a subset? For example, for my submit & cancel button, I can understand because I have not named them in the HTML form, but for another button/menu item with a name, the parameter is not submitted.

I'm pretty sure it is very simple, and any help would be welcome.

Thanks

Olivier
3 REPLIES 3

orichaud
Champ in-the-making
Champ in-the-making
I have progressed by myself on this topic, and what i noticied is that it does not work only with my YUI button menu. The selected value is not passed. I compared this with a hidden field, and in this case, no problem.
Thus my question is : how can I have my selection correctly handled?
Olivier

gavinc
Champ in-the-making
Champ in-the-making
It probably depends on how you have constructed your YUI menu component. Have you created it with or without existing HTML?

My guess is that the YUI menu is not setting it's value on an element that is being submitted with the form so you either need to build your menu from an existing select element (that has a name attribute) or you need to add a hidden field to your form and get the YUI menu button to update the hidden field whenever it's value changes.

orichaud
Champ in-the-making
Champ in-the-making
Yes, this is the workaround I found. I added an hidden field that I update on menu changes.