I'm creating a form using the Joomla XML form definition, and I want to create a range of integer values a user can select from. The number/integer field is fine for this use-- but I need to allow the first, last, and step parameters to be set by the user of the component. Is it possible to pass in variables to the XML form?

<field name="myintegervalue" type="integer" default="Some integer" label="Choose an integer" description="" first="1" last="10" step="1" />

I realize it's possible to create a custom field type, but then I'd end up re-inventing the wheel and building the select list with the min / max / step values and duplicating the JFormFieldNumber code.

  • So in your form, before your number field you will have 3 other fields that will set the min/max/step params?
    – FFrewin
    Sep 8 '18 at 17:26
  • This question has been recently answered here joomla.stackexchange.com/questions/23391/….
    – Sharky
    Sep 8 '18 at 19:53
  • @user101289 after reading the related solution that Sharky posted, if you still require support please update your question to be more specific about what you require.
    – mickmackusa
    Sep 8 '18 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.