softwarestudent
Forum Replies Created
-
I made something similar for a project I’m working on using CF!
https://github.com/thely/wtsscheduling/tree/master/wp-content/plugins/cf-pods-filterable
Download this folder as a .zip and add it as a plugin. In your Layout Editor, add a new Filterable Pods field, which should appear in the Basic category. In the field config, “Filter this Pod by” is your WHERE statement, and the “Field to filter from” is the Pod you’re querying.
Right now, it has two main states – it’s a dropdown if you want to display the information you receive, or it’s a hidden field containing JSON output if you click “Hide field output.” If you want additional Pod fields in the JSON output, put the field slugs as a comma-delimited list in the “Extra fields from Pods.” Multi-select hasn’t been implemented because there’s a lot of parts to the project this is in, but we have a looming deadline, so it should be completed soon. ??
You’ll probably need to edit podscall.php, because it has some project-specific code. Edit the line that reads
if ($whichpod == "wts_course")
and change that to whichever Pod slug you want to use. If it’s not a post type, you’ll also need to figure out what you want to use as the ID and name.Forum: Plugins
In reply to: [Caldera Forms - More Than Contact Forms] jQuery-based custom fieldsAha, that’s exactly what I needed! Hidden fields made this work perfectly, thanks a ton.
New issues, the further I delve: magic-tag-enabling on config fields.
magic-tag-enabled
is set as a class on the config variables that need it in config.php. In the CF layout editor, the<\>
button shows up when selecting that input, but clicking it doesn’t open the magic tag menu. And even when other magic-tag-enabled fields on the form open the<\>
menu, they only display System Tags (like{user:user-login}
), not Fields (like%your_name%
). The first of these fields I click on displays this error:Uncaught NotFoundError: Failed to execute 'appendChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?
I’m guessing this issue is related to the HTML Field Bindings support questions that have already been asked. If not, a link to the code is below if you have time to take a look (it’s short!).
https://github.com/thely/wtsscheduling/tree/master/wp-content/plugins/cf-fullcalendar-io
Forum: Plugins
In reply to: [Caldera Forms - More Than Contact Forms] Make a custom processor?While the experience was initially pretty befuddling, I think I’ve got the hang of it now! The plugin isn’t the most elegantly written thing in the world, but it’s very real and I’d say you can mark this topic as Resolved. ??
Sorry to bug you a second time, but this is related!
I’m working with the Pods-CF plugin while making a conditional form, and I’m running into a couple things that are big hurdles. As a quick description, I’m working on a couple CF forms to map to the User pod, both to create new users and to update existing ones. The users are divided into three very similar types depending on their department, but some user types don’t need certain fields (ergo conditional form). Things I encountered:
- Conditionals don’t work with auto-populated pod fields. I understand how this could be rough, since if the pod changes, the form might break, but it seems like conditionals are removed already if CF field types change.
- “Simple defined lists” in pods are only recognized for mapping by Pods-CF if the CF field is a dropdown. Could they be toggle switches too? Adding new users by department is way easier for the non-tech-savvy dept heads when they can see the buttons clearly.
- It might be helpful to add something in Pods-CF that allows you to update an existing pod instead of always adding a new one. I added a hack to the Pods-CF functions.php to use
pods->save()
instead ofpods->add()
if a given field_id is present on the form, but I’m sure there’s a less dirty way of doing this. (just a future suggestion, since I’ve got my own fix for now)
Forum: Plugins
In reply to: [Caldera Forms - More Than Contact Forms] Make a custom processor?This is really helpful – thank you so much! I’ll update when we have a working version.