The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [input]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

Pass post ID to wp_update_post

Need your help. I have created a custom post type and have a list table of the latest 10 posts. I need to change the post status of those post which I check a checkbox. However, I can not figure out ...
0
votes
2answers
25 views

Redirect when user clicks on an image

I want to make it so that when a user clicks on an image in my site, they are redirected to a specific page. I WAS using a submit button for the redirect, but I want to replace it with a custom-...
0
votes
1answer
19 views

Desktop is class List and Mobile is class Grid

<input type="radio" class="list" checked> <!-- checked, desktop --> <input type="radio" class="grid"> <!-- checked, mobile --> Here class list is desktop and mobile. I know it ...
0
votes
0answers
13 views

Buddypress profile fields don't get exported

How can i export buddypress extended profile's titles? When i export buddypress's extended fields, it seems like wordpress is just exporting input names without their parent titles. As you can see ...
0
votes
1answer
23 views

Back button not working after input / search submit

Thanks to Sally CJ I am super close to having everything figured out with an autocomplete search I am building out. The only problem I am having is the back button is not working after the user is ...
0
votes
0answers
29 views

How can I make this custom field CF7 required?

I have this code for my custom field: add_action( 'wpcf7_init', 'custom_views_post_title' ); function custom_views_post_title() { wpcf7_add_shortcode( 'custom_views_post_title', '...
0
votes
0answers
34 views

How to add inputs dynamically in settings page (Plugin)

I have the following function in my plugin and want to add the Datepicker and Textarea dynamically, so that the User can add an row of the same Elements with an "Add" button. I have an array with ...
0
votes
1answer
866 views

getting the values of hidden inputs to use them in a php mysql query

Im trying to update a value in the database, to do this I pass the values of the input an ID to another hidden inputs and submit the form via jquery, the values are set in the hidden input (tested). ...
0
votes
1answer
109 views

Shortcodes in billing fields doesn't work

WooCommerce: 3.5.1 WordPress: 4.9.8 I want to set automaticly billing fields with data from GeoIP shortcodes, but it doesn't work. add_filter( 'woocommerce_checkout_fields', '...
0
votes
0answers
20 views

Meta box built with loop have 1 error in input

I am making a loop to build metabox with several inputs. It is working, but there is something strange happening. When loop runs. all inputs are working fine except one. always the same one. It ...
1
vote
0answers
10 views

Add select input with pre defined classes to insert image screen?

I'm looking for a way to add a select element (or some multiselect variant) with pre-defined classes to the image insertion screen in Wordpress. I've been looking around for some way to do this but ...
0
votes
1answer
47 views

How to save checkbox choice in wordpress

I know that i should use update_post_meta() function but don't know where put it in the code. I tried on the diferent ways but it's don't work how it should. if ( ! function_exists( '...
1
vote
0answers
54 views

Override admin submit_button() functionality

I would like to be able to override the submit_button() functionality, so that I can display it as a <button></button> element. Is that possible? I saw that the source is in wp-admin/...
0
votes
1answer
486 views

How to call or add password input / generate password / password strenght meter in custom registration form?

I will share my knowledge how to add password input/ generate password / password strenght meter with default/standar wordpress password. If you like this information, please upvote my question and my ...
0
votes
1answer
26 views

Frontend Category Checkbox

I need help with a code to customize the category taxonomies in the frontend. It's a code from a plugin: // Categories $vvc_categories = wp_get_post_terms( $vvc_id, 'vvc_tax_cat', array( ...
0
votes
1answer
112 views

Use of http form post

I'm porting a microsoft asp app to Wordpress. In it, I was using a form that had four different sort sequences that would change the sql SELECT used to get the data. Here is the html that I'm using to ...
-1
votes
1answer
178 views

Need help saving input fields for Security Deposit plugin in WC Vendors page

I'm having trouble integrating some input fields from a WooCommerce Security Deposits plugin (https://codecanyon.net/item/woocommerce-security-deposits-wordpress-plugin/19988389) into the frontend of ...
-1
votes
1answer
74 views

How to add input search field with roudned corners?

I am tryting to add seach field in my header: <form class="searchform"> <span><input type="text" class="search rounded" p laceholder="Search..."></span> ...
0
votes
0answers
24 views

New term taxonomy and description in front page. Input's

what's up guys. In front page i'd like to make 2 text form input's to new term to a taxonomy and discription to this term. I've got a code to add a new term wp_insert_term( 'Apple', // ...
1
vote
1answer
30 views

Add field to dashboard to update embedded URL on homepage?

I've tried searching but all the "add a dashboard widget" answers seem overcomplicated trying to do far too much -- or else they are too simple (e.g. the widget simply displays a message; does not ...
0
votes
1answer
422 views

get value from selected input

here is my situation, I have different input, each of them them having a <input id="q1a2" type="radio" name="q1" value="1" tabindex="-1"> <input id="q2a1" type="radio" name="q2" value="3" ...
0
votes
2answers
391 views

How to add a placeholder to the protected post password input

When a post is protected, its content looks like: // This content is password protected. To view it please enter your password below: // Password: [_______________] [Enter] How do I add a ...
1
vote
1answer
586 views

Plugin settings page checkbox not saving - one options array with sub array

I'm driving myself crazy here trying to get a checkbox to save on a plugin settings page. Right now, as a template, I'm working through the excellent example given here: Settings API with arrays ...
0
votes
0answers
55 views

Remove active cursor from form field

I have a form that is generated by a plugin on a page. The first input field is focused by default, meaning the cursor is in this field and ready for me to type in my information on page load. I have ...
0
votes
1answer
250 views

If input field has value Require another field - PHP

FORM - http://hoffwebsites.com/CBENT/registration_form.php I have a form where a parent registers a student. There is an option to register another child. What I need to do is if a parent ...
1
vote
0answers
16 views

Why Won't My Inputs in a form with a Get method work together?

I have two inputs that I'd like to use as a part of the same form. Each one delivers a variable which is used to modify a WP_User_Query to get users based on a large number of search fields. Both of ...
0
votes
2answers
3k views

Wordpress checkbox and Illegal string offset

I'm using the following code to determine if a checkbox has been ticked and then display some text if it has/hasn't as a test. When its checked, it works fine and the text displays. When its ...
2
votes
2answers
4k views

Get data from dropdown and update page

I have a simple webpage with a dropdown menu with a few options. I would like to be able to get the user's selection and then output the same selection on the webpage. This is the code I have so far. ...
1
vote
1answer
101 views

WordPress (admin) posts search GET request filter

I wrote up a plugin that adds a column to the posts, page table (list) in the WordPress Admin panel. Each row has additional input fields (checkboxes) - allow_comments, allow_pings. These checkboxes ...
1
vote
0answers
1k views

Change/Replace keyboard character on keypress while writing new post

Before opening this thread in here, I was searching all the day today a way to change/replace 2 keyboard keys when writing a new post on wordpress. What I need is, when an editor/admin press [ on the ...
0
votes
1answer
946 views

How to change number field to text field using JS

I am making the WooCommerce quantity field a text field so it looks nicer but I can't figure out how to make the minus button work. The plus button works fine, but I have no idea why the minus button ...
2
votes
1answer
856 views

How to replace a javascript select box onchange event to a form submit action?

I have a small problem that probably has a very simple fix. I have been using the wp_get_archives() function to produce a dropdown select form. See the full code below: <form id="side-arch"> ...
1
vote
1answer
60 views

plugin settings - uploading multiple files with a single button

My plugin settings' page has a <input type='file' name='adm_uploads' multiple /> button which allows my browser to select multiple files as expected. All goes well except that in my callback ...
0
votes
1answer
415 views

WP Page Options Array

I'm creating a page options which contain some multiple checkboxes with specific values. Here is a snippet of my checkboxes form code: <label>Global Checkboxes</label> <input ...
8
votes
1answer
15k views

wp_insert_post add meta_input

In the documentation of wp_insert_post there is a changelog on half of the page which says the following: Since: WordPress 4.4.0 A 'meta_input' array can now be passed to $postarr to add post ...
0
votes
1answer
153 views

Plugin option for input box validation

I'm crating a plugin option page from the code below. However, it does not explain how to get validation on the input fields. How do I get validation on id_number for NUMBER ONLY? https://codex....
1
vote
1answer
2k views

using checked function to verify value against an array

I have a 2-level taxonomy terms checkbox list (created with get_categories) that stores values into the usermeta table. I'd like to display the checked items when the page is refreshed. This is the ...
0
votes
2answers
2k views

Allow HTML in Settings API input field

I want to allow HTML into a plugin input field via a user, I am using the Settings API, but it strips everything HTML out. - Code below -any pointers? function plugin_settings(){ register_Setting( ...
1
vote
1answer
1k views

Refresh page after update_post_meta

I have created a input field on a front-page where the value of the database is on the same page as the input-field. If a value is passed to the database I have to reload the page for it to show on ...
0
votes
0answers
338 views

How to pass parameters thru URL?

I have two input text box, one recaptcha and submit button. I want to check if the values that inputted by the user are in the database and if the recaptcha is checked. But the database is located on ...
2
votes
1answer
89 views

WordPress widget / plugin…fields not appearing in my widget

Trying to create my first plugin. A simple one. It's doing mainly what I want to do except the widget itself in Appearance-->Widgets doesn't display my fields. Wondering if anyone could point me in ...
1
vote
1answer
49 views

WSoD being caused by this piece of code

This is a function I'm writing which is supposed to post an input along with some other information, to a database. As of right now, activating the plugin produces a WSoD, when the function is removed ...
0
votes
1answer
2k views

Save and user submitted data from a form and display them in the wp backend

My question is very simple but the answer I'm not sure if will be that simple. I'm developing a website for a non-profit organization where people can fill out a form containing questions usually ...
0
votes
1answer
2k views

Input with pattern not working

On the admin widgets.php page I am trying to setup a pattern on an input to only allow digits. If I enter an invalid character like a non-digit it still accepts it and when I save the Widget with an ...
5
votes
1answer
617 views

Send attachments via wp_mail from temporary folder

Is it possible to send attachment via wp_mail, using temporary file, instad of uploading them to any actual folder on server? For example: <input type="file" name="file"> $attachment[] = $...
0
votes
0answers
522 views

Simple email input store in database

I'm trying to build a really simple form to store email adresses in the wp database for future newsletter purposes. What I have is just a single email input: <form method="POST"> <input ...
2
votes
3answers
3k views

sanitizing integer input for update_post_meta

When updating a post meta where the input will be always an integer, should i use (int) or is there any WordPress function for that (eg. sanitize_text_field) For example if(isset($_POST['category_id']...
0
votes
2answers
403 views

How to make blog post entries appear as input form instead of just text?

I want my blog posts to appear inside of a form input box instead of just text on a page. Not the title, but only the submission. Is that possible. My index.php: <a href="<?php the_permalink() ...
0
votes
1answer
1k views

Create input select image URL?

My code in functions is: <input type="text" name="Cat_meta[img]" id="Cat_meta[img]" size="3" style="width:60%;" value=" <?php echo $cat_meta['img'] ? $cat_meta['img'] : ''; ?>"> How to ...
2
votes
1answer
3k views

How to get the image url in the input box from media library?

I have added a post meta to upload image using wordpress media uploader. Looks like it's a javascript work. I am no good in javascript. I took the js from here: Here is the js code: jQuery(document)....