title: What can override the attributes in an html input?
body: <p>I am outputing the values I want into an html input with PHP. But for some reason it is not recognizing the <code>min</code> and <code>step</code> attributes. How can html attributes be overridden?</p>
  
  <p><strong>EDIT</strong> - I am customizing Anspress for Wordpress. <a href="https://github.com/anspress/anspress" rel="nofollow">Here is a link to look through the files for the plugin</a>.</p>
  
  <p>Any thoughts??</p>
  
  <p><strong>HTML that structures the output</strong> (<code>ap_ask_form()</code> is in the PHP code below)</p>
  
  <pre><code>&lt;div id="ap-form-main" class="active ap-tab-item"&gt;
      &lt;?php ap_ask_form(); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>ask_form.php</strong></p>
  
  <pre><code>class AnsPress_Ask_Form
  {
      public function __construct()
      {
          add_filter('ap_ask_form_fields', array($this, 'ask_form_name_field'));
      }
  
      public function ask_form_name_field($args){
          if(!is_user_logged_in() &amp;&amp; ap_opt('allow_anonymous'))
              $args['fields'][] = array(
                  'name' =&gt; 'name',
                  'label' =&gt; __('Name', 'ap'),
                  'type'  =&gt; 'text',
                  'placeholder'  =&gt; __('Enter your name to display', 'ap'),
                  'value' =&gt; sanitize_text_field(@$_POST['name'] ),
                  'order' =&gt; 12
              );
  
          return $args;
      }
  }
  
  new AnsPress_Ask_Form;
  
  /**
   * Generate ask form
   * @param  boolean $editing
   * @return void
   */
  function ap_ask_form($editing = false){
      global $editing_post;
  
      $is_private = false;
      if($editing){
          $is_private = $editing_post-&gt;post_status == 'private_post' ? true : false;
      }
  
      $args = array(
          'name'              =&gt; 'ask_form',
          'is_ajaxified'      =&gt; true,
          'submit_button'     =&gt; ($editing ? __('Update question', 'ap') : __('Post question', 'ap')),
          'fields'            =&gt; array(
              array(
                  'name' =&gt; 'title',
                  'label' =&gt; __('Title', 'ap'),
                  'type'  =&gt; 'text',
                  'placeholder'  =&gt; __('Question in one sentence', 'ap'),
                  'desc'  =&gt; __('Write a meaningful title for the question.', 'ap'),
                  'value' =&gt; ( $editing ? $editing_post-&gt;post_title : sanitize_text_field( @$_POST['title'] ) ),
                  'order' =&gt; 5,
                  'attr' =&gt; 'data-action="suggest_similar_questions"',
                  'autocomplete' =&gt; false,
              ),
              array(
                  'name' =&gt; 'title',
                  'type'  =&gt; 'custom',
                  'order' =&gt; 5,
                  'html' =&gt; '&lt;div id="similar_suggestions"&gt;&lt;/div&gt;'
              ),
              array(
                  'name' =&gt; 'description',
                  'label' =&gt; __('Description', 'ap'),
                  'type'  =&gt; 'editor',
                  'desc'  =&gt; __('Write description for the question.', 'ap'),
                  'value' =&gt; ( $editing ? apply_filters('the_content', $editing_post-&gt;post_content) : @$_POST['description']  ),
                  'settings' =&gt; apply_filters( 'ap_ask_form_editor_settings', array(
                      'textarea_rows'     =&gt; 8,
                      'tinymce'           =&gt; ap_opt('question_text_editor') ? false : true,
                      'quicktags'         =&gt; ap_opt('question_text_editor') ? true : false ,
                      'media_buttons'     =&gt;false,
                  )),
              ),
              array(
                  'name'  =&gt; 'ap_upload',
                  'type'  =&gt; 'custom',
                  'html' =&gt; ap_post_upload_form(),
                  'order' =&gt; 10
              ),
              array(
                  'name' =&gt; 'parent_id',
                  'type'  =&gt; 'hidden',
                  'value' =&gt; ( $editing ? $editing_post-&gt;post_parent : get_query_var('parent')  ),
                  'order' =&gt; 20
              )
          ),
      );
  
      if(ap_opt('allow_private_posts'))
          $args['fields'][] = array(
              'name' =&gt; 'is_private',
              'type'  =&gt; 'checkbox',
              'desc'  =&gt; __('Only visible to admin and moderator.', 'ap'),
              'value' =&gt; $is_private,
              'order' =&gt; 12,
              'show_desc_tip' =&gt; false
          );
  
      if(ap_opt('recaptcha_site_key') == '')
          $reCaptcha_html = '&lt;div class="ap-notice red"&gt;'.__('reCaptach keys missing, please add keys', 'ap').'&lt;/div&gt;';
      else
          $reCaptcha_html = '&lt;div class="g-recaptcha" id="recaptcha" data-sitekey="'.ap_opt('recaptcha_site_key').'"&gt;&lt;/div&gt;&lt;script type="text/javascript"
  src="https://www.google.com/recaptcha/api.js?hl='.get_locale().'&amp;onload=onloadCallback&amp;render=explicit"  async defer&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;var onloadCallback = function() {
          widgetId1 = grecaptcha.render("recaptcha", {
            "sitekey" : "'.ap_opt('recaptcha_site_key').'"
          });
        };&lt;/script&gt;';
  
      if(ap_opt('enable_recaptcha'))
          $args['fields'][] = array(
              'name' =&gt; 'captcha',
              'type'  =&gt; 'custom',
              'order' =&gt; 100,
              'html' =&gt; $reCaptcha_html
          );
  
      /**
       * FILTER: ap_ask_form_fields
       * Filter for modifying $args
       * @var array
       * @since  2.0
       */
      $args = apply_filters( 'ap_ask_form_fields', $args, $editing );
  
      if($editing){
          $args['fields'][] = array(
              'name'  =&gt; 'edit_post_id',
              'type'  =&gt; 'hidden',
              'value' =&gt; $editing_post-&gt;ID,
              'order' =&gt; 20
          );
      }
  
      $form = new AnsPress_Form($args);
  
      echo $form-&gt;get_form();
      echo ap_post_upload_hidden_form();
  }
  
  /**
   * Generate edit question form, this is a wrapper of ap_ask_form()
   * @return void
   * @since 2.0.1
   */
  function ap_edit_question_form()
  {
      ap_ask_form(true);
  }
  </code></pre>
  
  <p><strong>My extension to this plugin using the Wordpress hook "plugins_loaded"</strong> (the <code>ask_form_amount_field($args, $editing)</code> below is part of a class I made; if someone would like me to post it I can, just trying to show all the relevant info without making it too lengthy...)</p>
  
  <pre><code>public function ask_form_amount_field($args, $editing){
          if(wp_count_terms('question_amount_field') == 0)
              return $args; //Taxonomy stuff?
  
          global $editing_post;
  
          if($editing){
              $amount_field = get_the_terms( $editing_post-&gt;ID, 'question_amount_field' );
              $amount_field = $amount_field[0]-&gt;term_id;
          } //More things purely related to taxonomy, it seems.
  
          $args['fields'][] = array(
              'name' =&gt; 'amount_field',
              'label' =&gt; __('Amount field label', 'amount_field_for_anspress'),
              'type'  =&gt; 'number',
              'value' =&gt; ( $editing ? $amount_field :  sanitize_text_field(@$_POST['amount_field'] )), 
              'taxonomy' =&gt; 'question_amount_field',
              'orderby' =&gt; ap_opt('form_amount_field_orderby'),
              'desc' =&gt; __('Enter the amount you wish to tip someone for fulfilling your request.', 'amount_for_anspress'),
              'order' =&gt; 7,
              'min' =&gt; 0.50,
              'step' =&gt; 0.25
          );
  
          return $args;
  
      }
  
  }}//The class ends here; its beginning is not shown above
  
  function find_do_for_anspress() {
      $discounts = new Find_Do_For_AnsPress();
  }
  add_action( 'plugins_loaded', 'find_do_for_anspress' );
  </code></pre>