Auto Generate Reference

More
11 years 7 months ago #41769 by mauriestate
Hi,

I saw this somewhere in the forum few days ago but could not locate it again. We are trying to create a field that will auto-generate some code taken from the created article, such like this:
Code:
{{item->catid}}-{{item->id}}

Hence, authors won't have to add a reference each time they create a new article but the article reference is auto generated from the above code.

We have created a text field and put the above mention code as default, the field is hidden from the item edit form, both backend and frontend but only added to the template layout.

However, on frontend, we again see the same code:
Code:
GMP{{item->catid}}-{{item->id}}-00

This code should be displayed like this:

GMP1-12-00

Can you please tell us where we made a mistake in the creation of this field?

Offering professional real estate and investment services in Mauritius. Visit us at www.sjkestate.com to also see the power of Flexicontent with Joomla to promote our services.

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

More
11 years 7 months ago #41771 by ggppdk
Replied by ggppdk on topic Auto Generate Reference
Hello,

you want to store it in DB as field value?

or only display it at frontend but not store it in DB as field ?


-- 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
11 years 7 months ago #41772 by mauriestate
Replied by mauriestate on topic Auto Generate Reference
Hmmm, since our website is mostly a directory with many sections, guess it would be useful to store it in db as field value!

Offering professional real estate and investment services in Mauritius. Visit us at www.sjkestate.com to also see the power of Flexicontent with Joomla to promote our services.

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

More
11 years 7 months ago #41778 by ggppdk
Replied by ggppdk on topic Auto Generate Reference
Hello

i will make a FAQ article so that other people will benefit from this,
as this question has been asked some time
(create a field value automatically or semi-automatically)


-- 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
11 years 7 months ago #41780 by mauriestate
Replied by mauriestate on topic Auto Generate Reference
OK, please let me know as soon as the FAQ is available so I can go through it please and thank you again for everything.

Offering professional real estate and investment services in Mauritius. Visit us at www.sjkestate.com to also see the power of Flexicontent with Joomla to promote our services.

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

More
11 years 7 months ago #41781 by ggppdk
Replied by ggppdk on topic Auto Generate Reference
Hello,

we would have made it already

just thinking if this FAQ article will
- suggest developer to create a custom field,
- OR instead maybe add a textarea parameter to allow entering custom code to be executed when item is saved, that will create the field value


-- 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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.356 seconds
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
Save