[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] mv_click
On May 9, 12:37pm, JoshNarins@aol.com wrote:
} Subject: [ic] mv_click
}
} I am trying to adjust the main Search function in the Templates.
}
} I'd like, if the user enters a number, to limit the mv_search_field to just
} the SKU field in that case.
}
} In Perl, it seems that is as simple as,
} if ( $CGI_array->{'mv_searchspec'}[1] =~ /^\d+$/ ) {
} $CGI_array->{'mv_search_field'}[1] = "sku";
} }
}
} And it seems like I am supposed to use mv_click to make it happen.
}
} The problem is that the submit button is an image, and even when I name
} it mv_click, it does not seem to execute the code wrapped in...
} [set mv_click]
} [perl]
} Perl code mentioned above.
} [/perl]
} [/set]
}
} Am I correct in trying to set this up in the templates?
} I would imagine pages/results.html would be too late to try to change
} something like mv_search_field...
}
} Any help would be appreciated.
Try setting your mv_click value as a hidden field in the form. E.g.:
<INPUT TYPE=hidden NAME=mv_click VALUE="Check for Number">
Then name your mv_click block:
[set Check for Number]
[perl]
# your perl code
[/perl]
[/set]
-Bill
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users