Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress Metabox Input form Overflowing
    primarykey
    data
    text
    <p>I have a Wordpress plugin with some tables and input forms. The tables are built using the standard Wordpress table widefat class. The input forms are embedded into cells in the widefat table.</p> <p>Where I am just displaying data, the table resizes to fit the metabox. Where I am using input fields, the table overflows the metabox, see picture:</p> <p><img src="https://i.stack.imgur.com/8vvf2.png" alt="Input forms overrunning WordpressMetabox"></p> <p>I would like the input table to resize like the data table. </p> <p>This is how the normal table renders:</p> <pre><code>&lt;table class="widefat" id="item_publication_attributes"&gt; &lt;tr&gt; &lt;th class="type"&gt;&lt;b&gt;Type&lt;/b&gt;&lt;/th&gt; &lt;th class="date"&gt;&lt;b&gt;Date&lt;/b&gt;&lt;/th&gt; &lt;th class="name"&gt;&lt;b&gt;Name&lt;/b&gt;&lt;/th&gt; &lt;th class="address"&gt;&lt;b&gt;Address&lt;/b&gt;&lt;/th&gt; &lt;th class="gender"&gt;&lt;b&gt;Map&lt;/b&gt;&lt;/th&gt; &lt;th&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr class="publish-attribute publish-attribute-1"&gt; &lt;td class="type"&gt;Publisher&lt;/td&gt; &lt;td class="date"&gt;15/2/1971&lt;/td&gt; &lt;td class="name"&gt;Publish Company&lt;/td&gt; &lt;td class="location"&gt;63 The Street, The Town, Cambridgeshire&lt;/td&gt; &lt;td class="map-icon" style="font-size:70%"&gt;[map]&lt;/td&gt; &lt;td&gt;&lt;a href="#" class="publish-attribute-delete" data-id="1"&gt;Delete&lt;/a&gt; | &lt;a href="#" class="person-edit" data-id="1"&gt;Edit&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>And this is how the Form table renders:</p> <pre><code>&lt;form&gt; &lt;input type="hidden" name="post_id" id="add_publishing_attribute_post_id" value=2624/&gt; &lt;table class="widefat" id="add_new_publishing_attribute"&gt; &lt;tr id="add_new_publishing_attribute_row"&gt; &lt;td class="type"&gt; &lt;select name="type" id="add_attribute_type"&gt; &lt;option value="0"&gt;ID 0&lt;/option&gt; &lt;option value="1"&gt;ID 1&lt;/option&gt; &lt;option value="2"&gt;ID 2&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;td class="dd"&gt;&lt;input type="text" name="dd" id="add_attribute_dd" placeholder="dd" /&gt;&lt;/td&gt; &lt;td class="mm"&gt;&lt;input type="text" name="mm" id="add_attribute_mm" placeholder="mm" /&gt;&lt;/td&gt; &lt;td class="yyyy"&gt;&lt;input type="text" name="yyyy" id="add_attribute_yyyy" placeholder="yyyy" /&gt;&lt;/td&gt; &lt;td class="name"&gt;&lt;input type="text" name="name" id="add_attribute_name" placeholder="name" /&gt;&lt;/td&gt; &lt;td class="location"&gt;&lt;input type="text" name="location" id="add_attribute_location" placeholder="location" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="submit" name="submit" id="add_new_attribute_submit" value="Add"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p>Grateful for any suggestions</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload