이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Disable Gravity Forms Fields

설명

Simply install the plugin and add the appropraite CSS class to the form field you want to assign an attribute. This is done within the Form Editor under the Advanced tab of the field. The classes are “disabled” for the disabled attribute and “readonly” for the readonly attribute (don’t include the quotation marks).

스크린샷

  • Gravity Forms Advanced Tab w/ a CSS class of "disabled". This will set the field's attribute to disabled. Alternatively, you can enter the CSS class "readonly" to set the attribute to readonly.

설치

This section describes how to install the plugin and get it working.

Automatically

  1. Search for Disable Gravity Forms Fields in the Add New Plugin section of the WordPress admin
  2. Install & Activate

Manually

  1. Download the zip file and upload disable-gf-fields to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

FAQ

How do I use this plugin?

Once you’ve installed and activated the plugin, just add a the appropriate class to your field (“disabled” or “readonly”).

What is the difference between the disabled and readonly attributes?

Both attributes set a field to be uneditable by the user. This means that the field will not accept any input from a user. However, there are a few important differences between the two attributes. Here’s a good overview of disabled vs. readonly attributes.

Do you offer support for this plugin?

This plugin is very simple so it’s unlikely you’ll need support. If you do have any questions, feel free to email me.

후기

2018년 9월 14일
Very handy to add fields the user can't edit, in order to produce pdf contracts.
2017년 5월 4일
Works exactly as it says. This was a great timesaver. Simply give the field a class of "readonly" (or "disabled") and you're done. Thank you for a great plugin!
2016년 9월 3일
Im running this JS in my own custom file, but for those of you who want this to function in this plugin while using ajax you can change your disable-gf-fields.js file to the following code this can be done by editing the plugin file in through the WP plugin after installation by going to your admin screen and then plugins, then click edit next to this plugin and select the file . ..or you can just edit the js file before installation. anyway, gravity forms has a simple after render hook to allow for things to take place after any ajax or other renders of the form so you can just rerun the code any time the form is rendered by replacing this files code with this. jQuery(document).ready(function($){ $(".disabled input").attr('disabled','true'); $(".readonly input").attr('readonly','true'); }); $(document).bind('gform_post_render', function(){ $(".gform_wrapper .readonly input").attr("readonly", true); $(".gform_wrapper .disabled input").attr("disabled", true); }); then the plugin will work with ajax as well. THIS WILL ONLY WORK WITH READONLY to retain field data if you are pre-populateting the field dynamically! Disabled fields do not pass information to the server and as such do not retain any pre populated data from a query string or shortcode ect. with the ajax call such as after a failed submission or page change and will fall back to their default state. ..you can however just set the default value of a disabled field if it is a constant value to be pre-populated, and it will work fine. but the data still will not be submitted with the form. you should use readonly to have the data passed.
모든 10 평가 읽기

기여자 & 개발자

“Disable Gravity Forms Fields”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Disable Gravity Forms Fields”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.4

  • Updated to using $.prop() instead of $.attr()
  • Added support for textarea tags

1.3.1

  • Updated author info

1.3

  • Wrapped jQuery dependency in array in the enqueue call
  • Removed some specificity from the jQuery selectors (will work for any input with the appropriate classes)

1.2

  • Added the jQuery dependency to wp_enqueue_scripts() call

1.1

  • Added readonly attribute support

1.0

  • Launch version