Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Order Fields: Admin CP
As I've conveyed to you guys over the past month or so, the long-awaited custom order field functionality will be included with the next release of THT: v1.2.4. I am doing my best to make sure that you guys will love it, and to make it flexible enough for everyone. Here, I'm going to outline how this will work in the Admin Control Panel of THT.

Creating & Editing A Custom Field
    (<- click for larger)
Title: The "key" of the custom field. Should be short and sweet like: First Name or Phone #.

Description: The content you enter here will be shown in a tooltip (like this one) to the user to describe the field.

Input Type: The kind of field that will be presented. Use HTML5 options at your own risk. Regular expressions will be automatically applied for backwards compatibility.

Default Value: The value that will be placed in the field when the order form loads. You'll probably want to leave this blank, but it's here if you want it.

Regular Expression: Must be a PCRE (Perl Compatible Regular Expressions). This will be checked against what the client inputs for this custom field to verify its integrity. If the client's input matches the regex, then the input will be accepted. Check out for some prefab expressions.

Required: If this custom field is required, then the client must enter valid content into it. (It can't be left blank.)

You can't see this from the screenshot but you can drag and drop them into any order you like.

Package Selection
(will update with screenshot once completed)
Once you've setup your custom field information, then you should head on over to the package manager to select which packages the custom field should be active on. This opens up the possibility for more flexible scenarios. For instance, you might want additional user information (like a phone number) on your paid or larger packages.

There is already a semi-working version of this on our Subversion repository at our Google Code page, but it's by no means complete or an accurate representation of the final product. Comments, questions, and suggestions? Leave 'em here. It's 2:25 AM and back to work I go.
Kevin Mark - TheHostingTool Lead Developer
Great work Kevin.

Looking forward to seeing this deployed.
Jonny H - THT Main Developer & Founder

Very nice Smile. Awesome work as always Kevin
Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Kevin can we switch brains?
Thanks for the comments guys. Just committed r218 which includes some decent updates to this. Far from completion. For those of you already running a copy of the trunk, you'll want to run the updated upgrade.sql or reinstall

In the future, I might consider a time-based release system. For instance, a new release every two months. Would be interesting, but the current feature-based release system is working well for us.
Kevin Mark - TheHostingTool Lead Developer
hows current progress now? are the orderforms functional now?

Forum Jump:

Users browsing this thread: 2 Guest(s)