Questions tagged [input]

The tag has no usage guidance.

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

Live search in admin page

I'm building a plugin that works only in admin. I've a page where the user choose some posts, the script generate a pdf file from this data and then it save in a specif folder. To help the user to ...
user avatar
  • 1
1 vote
1 answer
39 views

input data and output table [closed]

I need a solution to do this with WP. In admin: I need to input data into database (name, surname, certification, level, date of issue). In Frontend: client can use a specific search field to search ...
user avatar
  • 111
2 votes
1 answer
138 views

Sanitizing comments or escaping comment_text()

I'm creating a template for comments on my WordPress site. I noticed that a simple <script>alert(1);</script> slips through the default WP codex implementation of comments, using the ...
user avatar
0 votes
1 answer
1k views

How to add "on change" to a text input in contact form7?

I am converting a static theme to a wp-theme and I am working on forms with wpcf7 plugin. I am wondering how can I write this code with wpcf7 text tag. <input type="text" name="name&...
user avatar
  • 1
0 votes
0 answers
34 views

Adding text box with add_meta_box

This is my code: $configuracoes = register_post_type( 'configuracoes', $args ); $configuracoes->add_meta_box( 'dados', 'Personalize os dados de impressão', array( 'tabs', ...
user avatar
1 vote
0 answers
143 views

how to upload a image from frontend with wp_insert_post and also update_post_meta?

I am using cmb2 for frontend form submission with custom post type name 'form'. But can not upload image with that. the first step is: array( 'name' => 'Image', 'type' =&...
user avatar
0 votes
2 answers
28 views

$_POST field value gets altered after "init"

I'm new to wordpress development. I'm trying to develop a simple plugin for practice. It involves a form submission from the frontend. The form has an input with the following code. <input type='...
user avatar
0 votes
1 answer
119 views

Add a second rich text input to post editor, and make that content available in post template

As per title, I want to add a second rich text editor (or whatever that's called now?) to the Post edit page, and then allow the content from that to be easily insertable inside any Post template page....
user avatar
  • 2,342
0 votes
1 answer
26 views

How to use jQuery(...).material_chip inside WordPress?

Although I have imported materialize.js (v1.0.0) inside my plugin in WordPress with $pluginpath = dirname (plugin_dir_url( __DIR__ )); $pluginpath = str_replace('\\','/',$pluginpath); $thepath = $...
user avatar
1 vote
0 answers
18 views

Enter name and email on the Product page and keep the input data on the Checkout page

I developed a custom Product page where I have to place the form with the Name field and Email address field. When I click a Purchase button Woocommerce links me to the Checkout Page (I avoided the ...
user avatar
  • 117
0 votes
1 answer
50 views

Custom Formdata matching with user table

I am writing a code to match form input data with user table in wp, but its not working proper, either condition is true or false, its giving same message. please help me to resolve it. function ...
user avatar
0 votes
1 answer
585 views

How to add dynamic fields on wordpress custom post type page in admin section

I need to add dynamic fields with title and description for post in admin section. I want to add these fields dynamically on click add new title and description. I want to save them in database and ...
user avatar
0 votes
1 answer
27 views

Wordpress search with more input fields?

I have this example of working search: <form action="<?php echo esc_url(site_url('/')) ; ?>" method="get"> <input type="search" name"s"> <input type="submit" value="search"&...
user avatar
  • 41
0 votes
2 answers
515 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-...
user avatar
  • 315
0 votes
1 answer
37 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 ...
user avatar
  • 21
0 votes
1 answer
299 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 ...
user avatar
  • 21
0 votes
1 answer
3k 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). ...
user avatar
0 votes
1 answer
235 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', '...
user avatar
1 vote
0 answers
16 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 ...
user avatar
  • 1,343
0 votes
1 answer
321 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( '...
user avatar
1 vote
0 answers
106 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/...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 97
0 votes
1 answer
75 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( ...
user avatar
  • 1
0 votes
1 answer
536 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 ...
user avatar
  • 23
-1 votes
1 answer
223 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 ...
user avatar
  • 1
-1 votes
1 answer
1k 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> ...
user avatar
0 votes
0 answers
31 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', // ...
user avatar
1 vote
1 answer
42 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 ...
user avatar
0 votes
1 answer
1k 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" ...
user avatar
0 votes
2 answers
923 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 ...
user avatar
  • 177
1 vote
1 answer
929 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 ...
user avatar
  • 145
0 votes
0 answers
99 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 ...
user avatar
  • 792
0 votes
1 answer
339 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 ...
user avatar
1 vote
0 answers
20 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 ...
user avatar
0 votes
2 answers
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 ...
user avatar
  • 103
2 votes
2 answers
6k 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. ...
user avatar
1 vote
1 answer
218 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 ...
user avatar
  • 205
1 vote
0 answers
2k 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 ...
user avatar
  • 11
0 votes
1 answer
1k 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 ...
user avatar
  • 105
2 votes
1 answer
1k 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"> ...
user avatar
  • 31
1 vote
1 answer
185 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 ...
user avatar
  • 13
0 votes
1 answer
575 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 ...
user avatar
9 votes
1 answer
24k 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 ...
user avatar
  • 333
0 votes
1 answer
187 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....
user avatar
  • 407
1 vote
1 answer
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 ...
user avatar
  • 60
0 votes
2 answers
3k 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( ...
user avatar
  • 163
1 vote
1 answer
3k 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 ...
user avatar
0 votes
0 answers
346 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 ...
user avatar
2 votes
1 answer
193 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 ...
user avatar
  • 171
1 vote
1 answer
53 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 ...
user avatar
  • 147