An easy way of creating multiple inputs would be very useful. We could
find no way using the original PerForm to create say <input name="blah00"
> ... <input name="blah99">. ie to recurse.. This is especially
important when doing lists of results/search results/product
queres etc.. any time we have wanted to do this, we have had to manually
create the fields in our stylesheets.
Putting the name as a child tag doesnt work..
<f:form>
<xsp:logic>
<![CDATA[
for my $i (0..99) {
$i = "0.$i" if length($i) < 2;
my $name = "text_$i";
]]>
</xsp:logic>
<f:textfield width="30">
<name><xsp:expr>$name</xsp:expr></name>
</f:textfield>
<xsp:logic>
}
</xsp:logic>
gives ..
[Wed Feb 12 12:35:50 2003] [error] [client 172.22.51.201] [AxKit]
[Error] Required arg "name" for tag textfield is missing at /test.xml line
863.
Using the xsp:attribute field doesnt seem to do it either.
<f:form>
<xsp:logic>
<![CDATA[
for my $i (0..99) {
$i = "0.$i" if length($i) < 2;
my $name = "text_$i";
]]>
</xsp:logic>
<f:textfield width="30">
<xsp:attribute
value="name"><xsp:expr>$name</xsp:expr></xsp:attribute>
</f:textfield>
<xsp:logic>
}
</xsp:logic>
</f:form>
gives ..
Global symbol "%_args" requires explicit package name at /test.xml line
857.
Global symbol "%_args" requires explicit package name at /test.xml line
858.
Global symbol "%_args" requires explicit package name at /test.xml line
858.
Global symbol "%_args" requires explicit package name at /test.xml line
858.
Global symbol "%_args" requires explicit package name at /test.xml line
858.
syntax error at /test.xml line 859, near "})"
Global symbol "$text" requires explicit package name at /test.xml line
860.
Global symbol "$parent" requires explicit package name at /test.xml line
864.
Global symbol "$parent" requires explicit package name at /test.xml line
864.
Global symbol "$cgi" requires explicit package name at /test.xml line 865.
Global symbol "$cgi" requires explicit package name at /test.xml line 868.
Global symbol "$cgi" requires explicit package name at /test.xml line 870.
BEGIN not safe after errors--compilation aborted at /test.xml line 87
Maybe there is another method?
On Wed, 12 Feb 2003, Matt Sergeant wrote:
> The new PerForm code at http://axkit.org/download/beta/PerForm.pm-1.7
> allows you to specify the methods to be called to validate your form
> fields. This is a big step forward as you can specify methods outside of
> your XSP page, or specify the same methods for a number of different form
> elements. But I'd like some feedback as to the design of the new
> attributes, specifically:
>
> What should the attributes be called for specifying the callbacks?
>
> Currently these are onvalidate, onload and onsubmit. These are case
> sensitive. I wasn't sure if onSubmit or on_submit would be better.
> Alternatively perhaps different names altogether would be better - I
> believe for example that ASP.NET uses onClick for when a button is
> clicked, but i only glanced through the ASP.net store in the shop the
> other day, so I can't be certain.
>
> Also let me know now if there's stuff you'd like to see go into PerForm. I
> may be hacking a bit with it in the next week or so, so now is the time to
> ask for features.
>
> --
> <!-- Matt -->
> <:->get a SMart net</:->
> Spam trap - do not mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]