Hidden controls are getting validated

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 лет назад
I spent quite some time this afternoon trying to figure why my Product Variant "save" button wasn't doing anything.

I've finally figured it out. Hidden controls are getting validated, meaning the ajax validatorextender was being also hidden.

In my case, on Administration/ProductVariantInfo.ascx, when cbIsRecurring is unchecked, it hides pnlCycleLength. since I'm upgrading from nopCommerce 1.50 to 1.80, one of the database upgrade scripts set all default values for nop_ProductVariant table, fields TotalCycles, CycleLength and CyclePeriod to 0, and IsRecurring to false.

This is probably low priority but can make some less informed user very lost.

I suggest either to modify the db upgrade script to set those columns as 1 or put a validationsummary so it makes easier to identify the problem but the most recommended thing would be to disable the validators if they are irrelevant.
13 лет назад
Just a tip.

I have changed all the validation to show errors in a popup window instead. Placing several validationsummaries in the mainpage. Easier to maintain that way (i think).
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.