Auto generated field not searchable

More
2 years 8 months ago - 2 years 8 months ago #80661 by nikitagupta2106
Hi,

I have a text field that is autogenerated. It works and is showing the autogenerated value. However, it's not searchable. I have the text field set to searchable too!

Please see the 4 screenshots uploaded.
 
Attachments:
Last edit: 2 years 8 months ago by nikitagupta2106.

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #80662 by ggppdk
Hello

here is an explanation
- Only the part that is saved into the Database is searchable
- The appending of item ID is done inside the viewing layout , thus it is not related to the search index

If you would want to make it searchable,
you will need to store the full value into the DB by creating via custom PHP code
(Parameter Automatic value creation that uses the Pro plugin)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #80666 by nikitagupta2106
Is there no other way apart from using paid version for now? even if it means fiddling with the core files?

I notice that there's a "placeholder" but it doesn't accept
Code:
{{item->id}}
sadly.

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago - 2 years 8 months ago #80671 by ggppdk
Hello

yes, you can do it with most powerful way which is to create a new field type

1. Duplicate the text field plugin
2. Rename 'text' to 'myfieldtype' in appropriate places (filenames and inside code) to create your own custom field type
3. Modify the PHP code of the field (In your case you will only need to modify method onDisplayFieldValue)

Of course you will have to use your own PHP code knowledge for examining existing field code and modifying it.

Guidance articles for developers to do the above are bellow:

How to duplicate a Flexicontent Field to create a new Field Type

How to use raw field values inside the value of other fields


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 2 years 8 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.273 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline