cwcfp_change_disabled_to_readonly

In some circumstances, a user may want a disabled text or text area field to be passed along with the order.

Using disabled on input type="text" or textarea fields prevents the value from being submitted with the checkout form.
The alternative for these fields is to set them to be readonly.
Using this method, any "readonly" textbox or textarea inputs will get submitted with the form, and be attached to the order. This may not be desired in all cases, so we need a filter to be able to switch back. By default no value would be able to be set on textbox or textarea inputs whether you use disabled or readonly. This add-on plugin will take the placeholder text on any text box or textarea input and set it as the field's value.
The work flow would then look like this:
  1. Add the above placeholder to value plugin.
  2. Make sure a filter is added to set text and textarea fields to readonly.
  3. Create a conditional text or textarea field with the disabled input and placeholder text.
  4. This placeholder text value will now be able to be saved with the order on submit.
The filter from #2 above would look like this:
add_filter( 'cwcfp_change_disabled_to_readonly', 'your_custom_function' );
function your_custom_function( $read_only ){
	return 'readonly';
}