_comment.php
23 hours ago
_db.php
23 hours ago
_hidden.php
23 hours ago
_label.php
23 hours ago
_row.php
23 hours ago
attachment.php
23 hours ago
checkbox.php
23 hours ago
cleditor.php
23 hours ago
codemirror.php
23 hours ago
color.php
23 hours ago
currency.php
23 hours ago
date.php
23 hours ago
datetime.php
23 hours ago
email.php
23 hours ago
link.php
23 hours ago
number.php
23 hours ago
oembed.php
23 hours ago
password.php
23 hours ago
phone.php
23 hours ago
radio.php
23 hours ago
select.php
23 hours ago
slider.php
23 hours ago
slug.php
23 hours ago
text.php
23 hours ago
textarea.php
23 hours ago
time.php
23 hours ago
tinymce.php
23 hours ago
website.php
23 hours ago
slug.php
27 lines
| 1 | <?php |
| 2 | // Don't load directly. |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | die( '-1' ); |
| 5 | } |
| 6 | |
| 7 | $attributes = array(); |
| 8 | $attributes['type'] = 'text'; |
| 9 | $attributes['value'] = $value; |
| 10 | $attributes['tabindex'] = 2; |
| 11 | $attributes = PodsForm::merge_attributes( $attributes, $name, $form_field_type, $options ); |
| 12 | ?> |
| 13 | <input<?php PodsForm::attributes( $attributes, $name, $form_field_type, $options ); ?> /> |
| 14 | <script> |
| 15 | jQuery( function ( $ ) { |
| 16 | $( 'input#<?php echo esc_js( $attributes['id'] ); ?>' ).on( 'change', function () { |
| 17 | var newval = $( this ) |
| 18 | .val() |
| 19 | .toLowerCase() |
| 20 | .replace( /([_ ])/g, '-' ) |
| 21 | .replace( /([`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/])/g, '' ) |
| 22 | .replace( /(-){2,}/g, '-' ); |
| 23 | $( this ).val( newval ); |
| 24 | } ); |
| 25 | } ); |
| 26 | </script> |
| 27 |