Title: Input with step
Last modified: December 17, 2022

---

# Input with step

 *  Resolved [yasbadri](https://wordpress.org/support/users/yasbadri/)
 * (@yasbadri)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/input-with-step/)
 * Hello,
 * I would like to add the step attribute to the field type number but I can’t find
   any options for it? I tried to add javascript but the code does not work. On 
   safari, it adds the step after each number. For example for a step of 5 -> 0/
   05/055/0555… On chrome, it does not take the code. Here is the code:
 *     ```wp-block-code
       <script>
       $( document ).ready(function() {
       	inputField = document.getElementsByName("fieldname5_1");
       	inputField[0].setAttribute("step", 5);
       });
       </script>
       ```
   
 * Can you help me please ? Thanks by advance.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/input-with-step/#post-16298639)
 * Hello [@yasbadri](https://wordpress.org/support/users/yasbadri/)
 * Thank you very much for using our plugin. Please, insert an “HTML Content” field
   in the form and enter the following piece of code as its content:
 *     ```wp-block-code
       <script>
       fbuilderjQuery(document).one('showHideDepEvent', function(){
       getField('fieldname5').jQueryRef().find('input').prop('step', 5);});
       </script>
       ```
   
 * Best regards.
 *  Thread Starter [yasbadri](https://wordpress.org/support/users/yasbadri/)
 * (@yasbadri)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/input-with-step/#post-16298760)
 * Thanks for your come back, but this code not run correctly. The value gone to
   max and just the min button run. Here is a screenshot to better understand. [https://www.loom.com/share/6e161ea18b764fe8b2a170163f12d902](https://www.loom.com/share/6e161ea18b764fe8b2a170163f12d902)
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/input-with-step/#post-16298787)
 * Hello [@yasbadri](https://wordpress.org/support/users/yasbadri/)
 * Thank you very much. I detected the issue cause and will include the definitive
   solution in the next plugin update. To fix it in your plugin copy, please, replace
   the content on the “HTML Content” field with the following piece of code:
 *     ```wp-block-code
       <script>
       fbuilderjQuery(document).one('showHideDepEvent', function(){
       getField('fieldname5').jQueryRef().find('input').attr('step', 5);
       jQuery(document).off('click', '#fbuilder .cff-spinner-down,#fbuilder .cff-spinner-up');
       jQuery(document).on('click', '#fbuilder .cff-spinner-down,#fbuilder .cff-spinner-up', function () {
           var u = jQuery(this).hasClass('cff-spinner-up'),
           e = jQuery(this)[u ? 'prev' : 'next']('input'),
           o,s,m,v;
   
           if (e.length) {
               o = getField(e.attr('id'), e[0].form);
               s = (e.attr('step') || 1) * 1;
               m = e.attr(u ? 'max' : 'min');
               v = o.val();
               if (e.hasClass('percent')) v = PREC(v * 100, 4) * 1;
               if (u) v += s;
               else v -= s;
               if (m) v = u ? MIN(v, m) : MAX(v, m);
               o.setVal(v);
               e.valid();
           }
       });
       });
       </script>
       ```
   
 * Best regards.
 *  Thread Starter [yasbadri](https://wordpress.org/support/users/yasbadri/)
 * (@yasbadri)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/input-with-step/#post-16298798)
 * 
   Perfect ! Thank you for your very very quick return. great plug-in

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Input with step’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [yasbadri](https://wordpress.org/support/users/yasbadri/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/input-with-step/#post-16298798)
 * Status: resolved