Questions tagged [input]

The tag has no usage guidance.

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

Display the output from Custom User Fields from a Wordpress user profile on a Wordpress Custom Page

I created Custom User Fields on a User Profile Using this tutorial. How do I add a field on the Users profile? For example, country, age etc. I created three custom fields with the names: "ID&...
1 vote
1 answer
62 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 ...
  • 111
2 votes
1 answer
195 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 ...
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&...
  • 1
0 votes
0 answers
51 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', ...
1 vote
0 answers
223 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' =&...
0 votes
2 answers
29 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='...
0 votes
1 answer
124 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....
  • 2,390
0 votes
1 answer
27 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 = $...
1 vote
0 answers
19 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 ...
  • 117
0 votes
1 answer
52 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 ...
0 votes
1 answer
627 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 ...
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"&...
  • 41
0 votes
2 answers
581 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-...
  • 325
0 votes
1 answer
52 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 ...
  • 21
0 votes
1 answer
346 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 ...
  • 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). ...
0 votes
1 answer
242 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', '...
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 ...
  • 1,343
0 votes
1 answer
352 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
0 answers
120 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
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 ...
  • 97
0 votes
1 answer
97 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( ...
  • 1
0 votes
1 answer
563 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 ...
  • 23
-1 votes
1 answer
224 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
-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> ...
0 votes
0 answers
32 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
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 ...
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" ...
0 votes
2 answers
976 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 ...
  • 177
1 vote
1 answer
954 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 ...
  • 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 ...
  • 792
0 votes
1 answer
352 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
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 ...
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 ...
  • 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. ...
1 vote
1 answer
256 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 ...
  • 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 ...
  • 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 ...
  • 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"> ...
  • 31
1 vote
1 answer
203 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 ...
  • 13
0 votes
1 answer
578 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 ...
10 votes
1 answer
26k 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 ...
  • 343
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....
  • 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 ...
  • 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( ...
  • 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 ...
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 ...
2 votes
1 answer
198 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 ...
  • 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 ...
  • 147