disabling the submit element not working?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

disabling the submit element not working?

Jean Luc-2
Hello,

I need to disable the submit button on our forms in certain cases (like a preview), as well as set the entire form read-only.

The latter works fine.

    <xf:model xxforms:readonly-appearance="static">
      <xf:instance xmlns="" id="form-data" readonly="true">

However, the button on the form is not disabled, no matter what I tried; the button is still clickable and the submit proceeds. I tried both of the following:
     <xf:submission method="post" id="form-submit" action="..." readonly="true" />
     <xf:submission method="post" id="form-submit" action="..." readonly="true" xxforms:readonly-appearance="static" />
 
Is there anything else needed? I can set any other attribute as I intercept it in Java and set some attributes dynamically anyway (like the action).
 
Orbeon is Orbeon Forms Release 3.6.0.200801171513, as a standalone WAR.
 
Many thanks,
JL


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: disabling the submit element not working?

Alessandro Vernet
Administrator
Jean Luc,

On Thu, Mar 6, 2008 at 12:05 PM, Jean Luc <[hidden email]> wrote:

> I need to disable the submit button on our forms in certain cases (like a
> preview), as well as set the entire form read-only.
>
> The latter works fine.
>
>     <xf:model xxforms:readonly-appearance="static">
>       <xf:instance xmlns="" id="form-data" readonly="true">
>
> However, the button on the form is not disabled, no matter what I tried; the
> button is still clickable and the submit proceeds. I tried both of the
> following:
>
>      <xf:submission method="post" id="form-submit" action="..."
> readonly="true" />
>      <xf:submission method="post" id="form-submit" action="..."
> readonly="true" xxforms:readonly-appearance="static" />
>
> Is there anything else needed? I can set any other attribute as I intercept
> it in Java and set some attributes dynamically anyway (like the action).
I assume you also have something like <xforms:bind
nodeset="instance('your-instance')" readonly="true()"/>, right? Also,
is your trigger bound with a ref to a node in the instance?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: disabling the submit element not working?

Jean Luc-2
Yes,

<xforms:bind nodeset="instance('your-instance')" readonly="true()"/>

is there as well. I don't have an <xforms:trigger> element, just a

 <xforms:submit submission='form-submit'>

Any other idea?
Thanks,
JL

----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, March 06, 2008 8:00 PM
Subject: [ops-users] Re: disabling the submit element not working?


> Jean Luc,
>
> On Thu, Mar 6, 2008 at 12:05 PM, Jean Luc <[hidden email]> wrote:
>> I need to disable the submit button on our forms in certain cases (like a
>> preview), as well as set the entire form read-only.
>>
>> The latter works fine.
>>
>>     <xf:model xxforms:readonly-appearance="static">
>>       <xf:instance xmlns="" id="form-data" readonly="true">
>>
>> However, the button on the form is not disabled, no matter what I tried;
>> the
>> button is still clickable and the submit proceeds. I tried both of the
>> following:
>>
>>      <xf:submission method="post" id="form-submit" action="..."
>> readonly="true" />
>>      <xf:submission method="post" id="form-submit" action="..."
>> readonly="true" xxforms:readonly-appearance="static" />
>>
>> Is there anything else needed? I can set any other attribute as I
>> intercept
>> it in Java and set some attributes dynamically anyway (like the action).
>
> I assume you also have something like <xforms:bind
> nodeset="instance('your-instance')" readonly="true()"/>, right? Also,
> is your trigger bound with a ref to a node in the instance?
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: disabling the submit element not working?

Alessandro Vernet
Administrator
Jean Luc wrote:
> <xforms:bind nodeset="instance('your-instance')" readonly="true()"/>

OK, good.

> is there as well. I don't have an <xforms:trigger> element, just a
>
> <xforms:submit submission='form-submit'>

Yes: the <xforms:submit> controls needs to be bound to a node in the
instance to be shown as read-only. Try to add a ref and bind it to some
node in the instance (I guess ref="instance('your-instance')" should do).

Alex

--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: disabling the submit element not working?

Jean Luc-2
Thank you, that fixed it.


----- Original Message -----
From: "Alessandro Vernet" <[hidden email]>
To: <[hidden email]>
Sent: Friday, March 07, 2008 7:27 PM
Subject: [ops-users] Re: Re: Re: disabling the submit element not working?


> Jean Luc wrote:
>> <xforms:bind nodeset="instance('your-instance')" readonly="true()"/>
>
> OK, good.
>
>> is there as well. I don't have an <xforms:trigger> element, just a
>>
>> <xforms:submit submission='form-submit'>
>
> Yes: the <xforms:submit> controls needs to be bound to a node in the
> instance to be shown as read-only. Try to add a ref and bind it to some
> node in the instance (I guess ref="instance('your-instance')" should do).
>
> Alex
>
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws