[cv6] Custom Field Extension

[cv6] Custom Field Extension 1.1.0 Release Candidate 3

No permission to download

Hoffi

Well-known member
Hoffi submitted a new resource:

[cv6] Custom Field Extension - This AddOn adds two new CustomField Types (image and Combo) and adds more options

With this brand new AddOn you can add new types of custom fields:
  • Image
    The User can upload one or multiple images (XenForo Attachment System is used for this)
  • Combo Box
    The Combo Box combines a Text box and a Simple Drop Down Box. You can change settings for both elements as usual and define the order of both.
New Options:
  • The number files now has a step value
  • You can specify a placeholder
All other: See images!

Supports also Resource...

Read more about this resource...
 
This looks like a great add-on even though I'm still thinking of how to make use of the text/dropbox feature.

However I'm looking forward to another type of combo field, drop down box-drop down box.

e.g. I preset the following:

drop down box 1
- drop down box option A
- drop down box option B
- drop down box option C
drop down box 2
- drop down box option X
- drop down box option Y
- drop down box option Z

If a user chooses drop down box 1, he will be presented option A, B and C to choose from.
 
This looks like a great add-on even though I'm still thinking of how to make use of the text/dropbox feature.
I needed this for another upcoming AddOn. :) Initially this was part of it, but I decided to split them up that everyone can use these new fields.

If a user chooses drop down box 1, he will be presented option A, B and C to choose from.
I understand, it may be not so easy, and not easy to configure.

Can this be used on live site?
On your own risk.
I am not using it at the moment on my live site. But that depends that the parent AddOn is not ready yet, which will need this one.
 
I needed this for another upcoming AddOn. :) Initially this was part of it, but I decided to split them up that everyone can use these new fields.


I understand, it may be not so easy, and not easy to configure.


On your own risk.
I am not using it at the moment on my live site. But that depends that the parent AddOn is not ready yet, which will need this one.
Means is not stable version to use?
 
You may want to talk to AddonsLab, because it seems that your addon and the thread filters doesnt like each other.
Tomorrow i will try to find the problem, now it is too late for that. Good night.
 
Last edited:
I cant resist ... i have deactivated the thread filters, now i can save a thread/post.
But i dont have any field for upload.

2. If i upload an image and dont insert, then edit the post, there is no link on the image ti insert it.

The forum is fresh installed, newest version, almost no addons installed.
 
Ok, maybe the problem is the "location field addon" from AddonsLab, because when i daectivate it, i have my fields for upload.
But there is still the problem with insert.
Try: upload a picture, dont insert, save. Now edit! => no link for insert on the thumbnail.
 
Last edited:
Hey,

I really like the addon, I found a bug with the image upload.
If you set the image upload as a required field and nothing is uploaded you get the following error:

Code:
XF\Db\Exception: MySQL query error [1048]: Column 'field_value' cannot be null in src/XF/Db/AbstractStatement.php at line 228
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 274
XF\Db\AbstractAdapter->insertBulk() in src/XF/Behavior/CustomFieldsHolder.php at line 149
XF\Behavior\CustomFieldsHolder->postSave() in src/XF/Mvc/Entity/Entity.php at line 1269
XF\Mvc\Entity\Entity->save() in src/XF/Service/Thread/Creator.php at line 494
XF\Service\Thread\Creator->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
XF\Service\Thread\Creator->save() in src/XF/Pub/Controller/Forum.php at line 910
XF\Pub\Controller\Forum->actionPostThread() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2344
XF\App->run() in src/XF.php at line 512
XF::runApp() in index.php at line 20

Is there a possibility to change this error? I would like to add a phrase for it.

And would it be possible to change the allowed image formats? Or change it to be more than just images?
I would love to replace the normal upload with your addon.
 
For the required field I will check and fix.
Actually I took all data which is set for attachments. If you can upload JPG as Attachment, you can upload it as Custom Image (at the end it is an attachment).
You can't replace the default Upload with this one. There are no possibilities to add it to a single post. It's enhancing the default uploader, so it can't replace it.
 
Hoffi updated [cv6] Custom Field Extension with a new update entry:

1.0.1 RC - now with calculation field

Bugs fixed
  • error if image file is set as required field and no image is uploaded
  • image entity not deleted after deleted last attachment for one field
  • add custom fields database changes after resource manager install

New Features
  • Calculation field
    • with new dependency to loaded library via composer nxp/math-executor
  • added field id into field list view to grab easily an field if for calculation

Improvements...

Read the rest of this update entry...
 
@Robert9 I can't test with these AddOns, I don't owe them. But if its still an Issue (the Template Mods changes in the meantime a bit) I can take a look into your AdminArea to check why its not working. If you want, just drop me a conversation.
 
Hi @Hoffi I have the following problem.

1642912926947.png

1642912986170.png

Result:

1642913055882.png

The values doesn't show up in the post.

But the selected option/text is correct when I edit the post.

Default style. Latest xenforo.
 
Last edited:
@Hoffi good to see you updating.

Can this add-on do a calculate of user review fields data and show it on resource view page? just got the idea when I read the Calculation field.

Example use case:
  • Let's say I have 3 resource review choice fields, and I call them:
    1. Alpha and/or Beta
    2. RC and/or Gold
    3. Buggy and/or Stable
  • and multiple user posted reviews with choices above
  • Now we calculate and display the total percentage of users review field choices on resource view page as:
    • 15% users think this resource is Beta
    • 25% users think this resource is RC
    • 60% users think this resource is Buggy
 
Top Bottom