Forum

Thread tagged as: Forms, FoxyCart, Field-Types

Changing maxlength of textarea depending on option selected (Foxycart Shop App)

This is an odd one, but is anyone aware of a way to change the max character limit of a textarea depending on an option selected.

To put it into context, as part of my webstore, I have a set of personalisation options e.g. Up to 5 Characters (+€5.00), Up to 10 Characters (+€10.00)... etc.

At the moment, the maxlength of the textarea is limited to 25 characters. Ideally, I would like the maxlength to change depending on the option selected: e.g. "Up to 5 Characters" selected, maxlength would = 5

The personalisation options are added via the "Product Options" tab in the Shop (Foxycart) App.

Alan McDonnell

Alan McDonnell 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's not currently possible, no. The limit is set in the template and is the same for all circumstances.

No problem Drew. Thanks for getting back to me... I knew it was a longshot anyway. I had achieved similar using javascript, but wasn't able to recreate it within a perch form.

Thanks again.