GithubHelp home page GithubHelp logo

calderawp / caldera-custom-fields Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 11.0 265 KB

Save Caldera Forms submissions in a post type or use Caldera Forms to create custom metaboxes.

Home Page: https://calderaforms.com/downloads/caldera-form-custom-fields/

PHP 56.66% CSS 43.34%

caldera-custom-fields's Introduction

=== Caldera Custom Fields ===
Contributors: Desertsnowman, Shelob9, nahuelmahe
Tags: Custom metabox, caldera forms, form as metabox, custom metaboxes, custom fields, custom field, form custom field, form to post type, calderawp, front-end editor, front end editor
Requires at least: 4.5
Tested up to: 4.8.3
Stable tag: 2.2.1
License: GPLv2

Caldera Forms to post types and custom fields: front-end or back-end

== Description ==
A free addon for [Caldera Forms](https://CalderaForms.com/) to create or edit posts, including custom post types and custom fields. Can be used as a standalone form for front-end editing and as a custom metabox generator in the post editor.
== Installation ==

Other than using the automatic plugin installer from plugins page, You can extract the contents and upload the cf-metaboxes folder to /wp-content/plugins/ directory.

Activate the plugin through the 'Plugins' menu in WordPress

Edit or create a new form. Navigate to Processors tab and click "Add Processor". Click the "Use Processor" button next to the "Form as Metabox" item.

Configure the processor by setting the Post Types you want the metabox to be in, the Context and Priority. Then click Update Form.

You will now see your metabox when creating a new post of the type you specified. All entries are save as custom fields for that post using the field slug as the key.

== Frequently Asked Questions ==
none yet.

== Screenshots ==
1. Metabox processor config options. Simple but effective.
2. Using conditional logic to make great progressive metaboxes.

== Changelog ==

= 2.2.1 =
FIXED: Save simple file field file as Pods custom field and use magic tags as pods custom field ( along the Paypal Processor )

= 2.2.0 =
SEE: [https://calderaforms.com/updates/caldera-custom-fields-2-2-0/]*https://calderaforms.com/updates/caldera-custom-fields-2-2-0/)
ADDED: Better support for Pods file fields

= 2.1.4 =
SEE: [https://calderaforms.com/updates/caldera-custom-fields-2-1-4)(https://calderaforms.com/updates/caldera-custom-fields-2-1-4)
* Fixed nonce check for metabox save
* Improved handling for featured images.

= 2.1.2 =
Fix minor bug fixes
= 2.1.1 =
Minor bug fixes

= 2.1.0 =
Make metabox compatible with CF 1.3.5+
Add support for taxonomies

= 2.0.4.1 =
Fixed a bug that caused saving of said fields not work.

= 2.0.4 =
Added visual_editor as accepted type for content area in save to post type
Added better icons to the processor selector

= 2.0.3 =
Corrected a bug that prevented saving new posts with CF 1.2+

= 2.0.2 =
Added permalink magic tag for using the posts permalink in another processor.

= 2.0.1 =
Fix a broken include for post type config in admin.

= 2.0.0 =
Added a second processor for using Caldera Forms to create and edit posts and custom fields

= 1.0.5 =
* Support to handle multiple form metaboxes

= 1.0.4 =
* Compatibility for CF 1.9+
* Dont allow ajax based forms for metabox

1.0.3: Compatibility for CF 1.1.0
1.0.2: Multi page compatibility
1.0.1: compatibility with CF 1.0.4
1.0.0: initial release

== Upgrade Notice ==
still new, so nothing to upgrade.

caldera-custom-fields's People

Contributors

bagerathan avatar davidcramer avatar gabweb avatar new0 avatar shelob9 avatar thunderlab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

caldera-custom-fields's Issues

Php Error with "Save a post type"

A Php error page appears briefly, before saving the post type.
Cause : file \includes\to-post-type.php (line 550)
bug: $value = Caldera_Forms::do_magic_tags( $value, $entry );
fix: $value = Caldera_Forms::do_magic_tags( $value, $entry_id, $entry );

JS error in post editor

Originally reported here: CalderaWP/Caldera-Forms#962
Our client website is displaying an JS error in console related with Caldera Forms:

/wp-content/plugins/caldera-forms/assets/js/frontend-script-init.min.js:1
Uncaught TypeError: Cannot read property 'on' of undefined
After install a new and empty WordPress in localhost, we found a pattern to see the issue:

  1. Install Caldera Forms AND Caldera Custom Fields plugins.
  2. Create a form and add a processor from Caldera Custom Fields.
  3. Try edit a simple post, the error is displayed.

Others plugins are broken because of this error.

Extra information: this error only happens when we have Caldera Forms AND Caldera Custom Fields plugins installed and activated together, and we have at least one form with the Caldera Custom Fields processor configured.

Problem using a frontend edition form, with custom taxonomies

What Version Of Caldera Forms, WordPress and PHP Are You Using?
Caldera forms : 1.5.8.2 - Wordpress : 4.9.1 - PHP : 7.1.7
Does Your Issue Persist When You Disable All Other Plugins and Switch To The Default Theme?
What Is The Unexpected Behaviour?
It seems that cutom taxonomies in checkboxes or radio buttons doesn't work on frontend edition : values are not kept, nothing is checked. (it works with a manual list, but not with an autopopulated list of custom taxonomies)
What PHP Errors Have You Logged While Reproducing This Bug?
none
What JavaScript Errors Have You Seen While Reproducing This Bug?
none

Send mail depending the date

Hi,
I'm trying to send a mail depending the date (after a date I send a mail, before send another one).
I'm using the {date:Y/d/m} static form variable. Using conditional in the auto-response processor like this
if [name_Var] 'is bigger than' 2017/01/08 --> Use the processor and send mail.
Where [name_var] is a custom var {date:Y/d/m} static.
But it doesn't work.
What I'm doing wrong???
:'(

PHP fatal error on image upload

Tried to save a image as featured image into a custom post type. Basic Uploader throws a php fatal error. As soon as I remove the 'Save as Post Type' prosessor, the form ist able to save the image into the media library.

Fatal error: Uncaught ArgumentCountError: Too few arguments to function cf_custom_fields_upload_handler(), 2 passed in C:\laragon\www\B16-Test\wp-content\plugins\caldera-forms\includes\field_processors.php on line 145 and exactly 3 expected in C:\laragon\www\B16-Test\wp-content\plugins\caldera-form-metabox\includes\to-post-type.php:596 Stack trace: #0 C:\laragon\www\B16-Test\wp-content\plugins\caldera-forms\includes\field_processors.php(145): cf_custom_fields_upload_handler(Array, Array) #1 C:\laragon\www\B16-Test\wp-includes\class-wp-hook.php(298): cf_handle_file_upload('trupl59216a6e90...', Array, Array) #2 C:\laragon\www\B16-Test\wp-includes\plugin.php(203): WP_Hook->apply_filters('trupl59216a6e90...', Array) #3 C:\laragon\www\B16-Test\wp-content\plugins\caldera-forms\classes\core.php(2233): apply_filters('caldera_forms_p...', 'trupl59216a6e90...', Array, Array) #4 C:\laragon\www\B16-Test\wp-content\plugins\caldera-forms\classes\core.php(2560): Caldera_Forms::get_field_data('fld_4057893', Array, false, true) #5 C:\lara in C:\laragon\www\B16-Test\wp-content\plugins\caldera-form-metabox\includes\to-post-type.php on line 596

WordPress 4.7.5, Caldera Custom Fields 2.1.4, Caldera Formulare 1.5.0.9

When paypal express is active, files (that are not featured) are not attached.

Scenario:
Given paypal express is active, 2 post type is active, and form has a file field that is not feature image.
Assert that file field is not attached. This is the bug.

Test for solution:
Given paypal express is active, 2 post type is active, and form has a file field that is not feature image.
Assert that file from the the field is attached. Bug is fixed.

Relevant questions:

  • When re-creating, when file field is saved does L421 foreach( (array) $value as $file ){ is reached -- IE no earlier continues are reached. ?
  • If so, what is the value of $value and how does it differ from same scenario, not PayPal Express?

Files are always saved to media library

When Pods is not activated, Files are saved even when the save to media library option is disabled and saved twice when the save to media library option is enabled.

Possible clue, same issue for featured images was fixed -- #17

Duplicate upload for custom fields (images)

Using the master branch of Caldera Custom Fields, images that are used with the Save As Post Type as a custom field is uploading twice.

To recreate -

  1. Create a Caldera Form that uses Save As Post Type Processor.
  2. In the processor do not set the upload field to the featured image so it's added to custom field
  3. Ensure 'Add to Library' is enabled on the upload field.

Featured Image set by text field?

Hi,

Can we use a text field (URL like: abc.com/image1.jpg) to be a Featured Image instead of File Uploader field?

If could not, can we inject featured image before post saved into database?

Thank you!

If pods is active files will not be uploaded unless post type is a Pod.

The Pods integration assumes all post types being used are Pods. That might not be true. In which case the default file uploader is removed (using cf_custom_fields_use_uploader filter) in favor of Pods' uploader. But CPT isn't a Pod, that filer returns false with no fallback.

Probably need to add a "Pods Mode" checkbox to enable that, but not sure how to make that backwards compatible. Maybe related #36

Save As Post Type doesn't add to Taxonomy

Caldera: 1.5.0.5
Custom Fields: 2.1.1

Summary

Posting data to a taxonomy does not work. No errors displayed on the frontend and the form submits successfully, creating the post and it's content as it should.

Only the taxonomy doesn't get created.

Below is the debug log file -

[14-Mar-2017 15:49:55 UTC] PHP Notice: Undefined index: {entry_id} in C:\Users\Andrew\Documents\Websites\caldera.dev\wp-content\plugins\caldera-custom-fields-master\includes\to-post-type.php on line 332

[14-Mar-2017 15:49:55 UTC] PHP Stack trace:

[14-Mar-2017 15:49:55 UTC] PHP 1. {main}() C:\Users\Andrew\Documents\Websites\caldera.dev\index.php:0

[14-Mar-2017 15:49:55 UTC] PHP 2. require() C:\Users\Andrew\Documents\Websites\caldera.dev\index.php:17

[14-Mar-2017 15:49:55 UTC] PHP 3. require_once() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-blog-header.php:13

[14-Mar-2017 15:49:55 UTC] PHP 4. require_once() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-load.php:37

[14-Mar-2017 15:49:55 UTC] PHP 5. require_once() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-config.php:92

[14-Mar-2017 15:49:55 UTC] PHP 6. do_action() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-settings.php:470

[14-Mar-2017 15:49:55 UTC] PHP 7. WP_Hook->do_action() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-includes\plugin.php:453

[14-Mar-2017 15:49:55 UTC] PHP 8. WP_Hook->apply_filters() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-includes\class-wp-hook.php:323

[14-Mar-2017 15:49:55 UTC] PHP 9. call_user_func_array:{C:\Users\Andrew\Documents\Websites\caldera.dev\wp-includes\class-wp-hook.php:298}() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-includes\class-wp-hook.php:298

[14-Mar-2017 15:49:55 UTC] PHP 10. Caldera_Forms->cf_init_system() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-includes\class-wp-hook.php:298

[14-Mar-2017 15:49:55 UTC] PHP 11. Caldera_Forms::process_form_via_post() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-content\plugins\caldera-forms\classes\core.php:3491

[14-Mar-2017 15:49:55 UTC] PHP 12. Caldera_Forms::process_submission() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-content\plugins\caldera-forms\classes\core.php:4805

[14-Mar-2017 15:49:55 UTC] PHP 13. cf_custom_fields_capture_entry() C:\Users\Andrew\Documents\Websites\caldera.dev\wp-content\plugins\caldera-forms\classes\core.php:3248

Let me know if you need any further specific information.

Post Status field is not-intuitive

Been meaning to fix this forever...

Currently you enter a text value for post status. A lot of times people enter "Published" then the created posts don't show in the back-end. Why? There is no post status registred called "Published" or even "Publish". The correct value for that setting would be "publish".

Best solution would be to change it to a dropdown of registred post statuses. But that's not backwards compatible and also means you could not use a magic tag...

CF advanced file upload field and Pods file field are not "connected"

Hi CalderaWP team!
I’m encountering a problem with uploaded files.
In CF, I use the advanced file upload field and in Pods I use the file / image field. Independently, each field works well but they aren’t “connected”…
When I upload files with the CF form, files are added to the media library but not added to the post.
I tried to use a “classic” upload field and it works, but I can’t upload multiple files… (even if the option is enabled).
I understand that the CF advanced file upload field generates an array of URLs while the Pods file field needs an array of ID's and I made some tests with Pods::save() but I can't make it work…

Editing a CPT with the Save as Post Type and Custom Fields Metabox results in changes not saved

Followup to this thread: https://twitter.com/fienen/status/893894221035339776

Using a front end Caldera Form, combined with the Save as Post Type and Custom Fields Post Metabox processors. The CPT is submitted from the front end, and then a user checks and edits it in the back end.

However, while you can edit and update the post, and it appears to save "correctly," the post doesn't reflect any changes you made after it reloads. No errors in the Apache or PHP logs.

capture
Looks normal when you open the post in the backend.

capture1
Changing the salary from 40.000 to 40000 and saving acts normal, and says it updated, but the salary hasn't changed from 40.000

capture4
Nothing special in the config. Note, it doesn't matter if Post ID is blank or set to {embed_post:ID}. Behavior is the same.

capture5
Metabox setup is plain.

Add frontend button to add fields

Hi,
I'm creating a contact form, in wich I'll want the user may be add name fields in the front end using a button to add participants to a group.
Do You think it's possible???
Which command should I use in the 'Add user' button???
Thank you =)

Auto populated taxanomy with dropdown select

I created a form to edit a custom post type from front end.

I set a single select dropdown to auto populate a custom taxonomy and it worked. The dropdown shows all the taxonomy.

The issue seems to be that :

  1. Drop down shows the first value not the selected value while editing the CPT. For example if a custom post type have a taxonomy selected lets say "cat2". Then the dropdown should select "cat2" as current value not the initial option of dropdown.

  2. If I select new option in dropdown then a new item is created with the ID as name. For example lets say we have "cat 10" with id "12" and I selected that value and update the form, a new item of taxonomy gets created with the name "12".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.