Keyword

extra field front-end editor default dynamic value

More
10 years 5 months ago #127323 by tex14
Hi

I have 3 extra fields (text fields type).
I need to put a dynamic value from the database in these textfields as default value.
in editform.php I don't see where to put the code.

maybe in plugins/k2.php ?

thanks

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

More
10 years 5 months ago #127324 by Lefteris
Hi. You can go and edit these extra fields. There you can define default values.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 5 months ago #127325 by tex14
heu...where ?

thx

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

More
10 years 5 months ago #127326 by Lefteris
Go to K2 administration and click extra fields. There you will see all defined extra fields. If you edit one you will see that there is a "default value" field.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 5 months ago #127327 by tex14
of course but I want to put a result from a mysql query and this default value has to be in the frontend submit form.
So I need to write the query in a php file and I dont see where to write this code in itemform.php

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

More
10 years 5 months ago #127328 by Lefteris
You can't do this with extra fields. Since you are a programmer you need to write a K2 plugin. You can get started by taking a look at the example K2 plugin github.com/joomlaworks/example-k2-plugin/.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum