October 23, 2013 at 4:00 pm 9306
|Kristopher||Just wondering how I would remove the $ from someone who inputs in price with a $ sign. If a user enters $ it is does not enter the database You help would be awesome|
October 24, 2013 at 12:33 pm 9362
May be you should use the number field here, should do some trick. I believe we’ve room for improvements in the plugins validation system.
October 24, 2013 at 12:44 pm 9364
So I have a text field with the metatag _price. Now, I have put a placeholder of “50 as an example”
But it would be good to remove the $ if the user put it in.
October 24, 2013 at 12:48 pm 9369
Use this code below in your themes functions.php. It should strip out any
update_post_meta( $post_id, ‘_price’, $price );
add_action( ‘wpuf_add_post_after_insert’, ‘wpufe_update_post_price’ );
October 24, 2013 at 1:25 pm 9372
I will try it when I am home
October 24, 2013 at 3:00 pm 9380
Buddy i have tried the code. This is what happened/ what i did: