Does anyone use CBWire? I've followed directions ...
# box-products
n
Does anyone use CBWire? I've followed directions precisely which seems very easy, the page loads and I can see my single form field, and still when I type something in the field it is not working or doing any validation on the fly, or ever for that matter after the page loads. Tried another example line for line, this one errors when page load due to the following #args.computed.counter()# with the error key [computed] doesn't exist. Should I give up or does someone maybe recognize this issue and can help me figure out what I've missed during setup/config? Thankful for any help anyone may have. Thanks
g
I'm just starting to use it but @Grant Copley is the person who knows the most about it. He also did a webinar a couple weeks ago where he goes through examples of setting it all up, calling functions, etc. Its worth a look. https://cfcasts.com/series/ortus-webinars-2023/videos/cbwire-live-coding-session-with-grant-copley
n
Awesome thanks, I'll take a look now
g
@Nick Kurucz there is also a cbwire channel in the Box Team Slack that you can post in too. Grant will be at the Ortus Office Hours on Friday as well. https://t.co/o09aN2GHWM
g
@Nick Kurucz That computed properties error is likely because you are not on the bleeding edge version. You’ll need to install it using CommandBox
Copy code
box install cbwire@be --force
Also, you need to enable the setting
useComputedPropertiesProxy
. https://cbwire.ortusbooks.com/essentials/configuration#usecomputedpropertiesproxy
@Nick Kurucz I’ve got a few minutes. Want to hop on Zoom real quick and I can help you get going?
🤘 1
☝️ 1
@Nick Kurucz Looks like you may have stepped away, and I need to also. Here’s what I suggest. 1.) Install the bleeding edge of CBWIRE:
Copy code
box install cbwire@be --force
2.) Add this to your config/ColdBox.cfc
Copy code
moduleSettings = {
			"cbwire": {
				"useComputedPropertiesProxy": true
			}
		};
3.) Reinit ColdBox http://yourapp/?fwreinit=yourKey Try it again. If it’s still not working, open up your dev tools to see if there are any JS errors and check the outgoing XHR/AJAX requests and make sure they are returning responses without an error. I hope this helps you.
n
I'm back.. I was watchin your webinar. And, it resolved my issue which was this just before closing body tag: #wireScripts()#
🔥 2
The example I followed online didn't mention that part (or I didn't follow along as precisely as I thought). Thanks a ton though
g
I probably missed mentioning it 🙂
Let us know if you run into any other issues
g
Which example was it? We can fix it.
Well, Grant probably will
n
it was me... i see it now
ugh
sorry to waste y'alls time on this.. i just missed it
image.png
its there...
g
No worries at all!
💯 1
🤘 1
g
I hope you like cbwire. It's very cool.
1
g
@Nick Kurucz If you have a moment and could star us on GitHub, we (especially me) will be forever grateful lol https://github.com/coldbox-modules/cbwire
1
n
it's awesome! i am glad i didn't give up and asked in the group for help
Definitely @Grant Copley
g
Thanks!
n
Hi Grant - Where are the error messages stored? The example is looping over an array errors, where is the array of errors or can I define those in the CFC where my constraints/data lives?
<cfloop array="#args.validation.getAllErrors( "email" )#" index="error">
wanting to modify this, for the email field: The 'email' value is required
as i continued watching the webinar.. it answered my question again, thanks again
g
@Nick Kurucz awesome. Yeah those error messages are generated by the cbValidation module, and you can customize the error text as needed.
n
ah, so i should ramp up on that doc too
for the validation stuff
g
I’ve stepped away from computer but when I’m back online I’ll update the docs with better examples on customizing the validations
n
man that's awesome, thanks so much
👍 1
n
will do
n
Would you put the code that processes the form data inside of the action (function) that a submit button calls? Or, would you use the args and do it inline on the .cfm page that has the form on it since the args has the same data and success can be passed into that page.
I put it in all in the CFC except presentation layer.
g
Sorry I missed this, just now seeing it
n
No worries..
g
Could you send me your CFC and template cfm? That will help me see what your working with
But yes, anything your form is doing, such as sending an email, creating a record in the database, etc those would go into your action function in the CFC
And ideally only things related to your UI presentation would go into your template .cfm file
n
sorry yep do you want me to send it here?
g
Sure, here or direct message on slack
n
sent it direct to you
i'm open to whatever you think, you won't offend me 🙂
g
@Nick Kurucz we are also having Ortus Office Hours tomorrow morning at 11am CT. Grant, Michael Born, and I will be there. https://t.co/o09aN2GHWM