Jump to content

Possible bug on InputfieldInteger using the step attribute [SOLVED]


Recommended Posts

Hello @ all,

today I have discovered a possible bug on the InputfieldInteger form field with the step attribute.

After adding the step attribute the submit button to save the module configuration page does not work anymore. This behavior only occurs if the type of the InputfieldInteger is set to number. If set to text everything works fine.

Take a look at https://processwire.com/api/ref/inputfield-integer/

Lets take a look at the code:

// this does not work -> input type set to number
$integerfield = $this->modules->get('InputfieldInteger');
$integerfield->inputType = 'number';
$integerfield->step = 10;

// this works 
$integerfield = $this->modules->get('InputfieldInteger');
$integerfield->inputType = 'text';
$integerfield->step = 10;

I did not get any error message, but as mentioned above, the submission does not take place.

If someone could test this on a configurable module and confirm or deny this behavior, before I open a new issue.

Best regards Jürgen

 

Link to comment
Share on other sites

Thanks @Robin S for your feedback.

I have disabled all inputfields on the configuration form except this InputfieldInteger and now it works too. It seems that there will be a combination of fieldsets, other inputfields, whatever that causes this strange behavior.

I keep this thread open, until I have found the reason and post it her.

Best regards Jürgen

 

Link to comment
Share on other sites

  • Juergen changed the title to Possible bug on InputfieldInteger using the step attribute [SOLVED]

Sorry, but I cannot post a possible cause for this behavior here. I have removed all fields and added it step by step to the configuration form again until the form was completed. This time no problem occurs. I cannot reproduce the failure, but I guess there was a JS problem, because the button could not be clicked to submit the form.

So the thread will be closed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...