Clearing field values

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

Clearing field values

danc-3
I have several repeats in my form where a user can add multiple entries for a specific type of item.

Whenever I insert a new entry, it always populates the fields (of the new entry) with the values of the prior entry.

Is there a simple way to clear out the field values of the new entry right after I insert the entry?

Thanks!

- Dan



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Clearing field values

Erik Bruchez
Administrator
Dan,

You can use xforms:setvalue, something like:

<xforms:action ev:event="...">
   <xforms:insert .../><!-- do the insertion -->
   <xforms:setvalue ref="..."/><!-- clear 1st value using index() -->
   <xforms:setvalue ref="..."/><!-- clear 2nd value using index() -->
</xforms:action>

But if your prototype already contains empty values, you don't need to
do the above.

-Erik

[hidden email] wrote:
> I have several repeats in my form where a user can add multiple entries for a specific type of item.
>
> Whenever I insert a new entry, it always populates the fields (of the new entry) with the values of the prior entry.
>
> Is there a simple way to clear out the field values of the new entry right after I insert the entry?
>
> Thanks!
>
> - Dan



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws