- Posts: 13
COMMUNITY FORUM
extra field front-end editor default dynamic value
- tex14
- Topic Author
- Offline
- New Member
Less
More
10 years 5 months ago #127323
by tex14
extra field front-end editor default dynamic value was created 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
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 5 months ago #127324
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: extra field front-end editor default dynamic value
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.
- tex14
- Topic Author
- Offline
- New Member
Less
More
- Posts: 13
10 years 5 months ago #127325
by tex14
Replied by tex14 on topic Re: extra field front-end editor default dynamic value
heu...where ?
thx
thx
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 5 months ago #127326
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: extra field front-end editor default dynamic value
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.
- tex14
- Topic Author
- Offline
- New Member
Less
More
- Posts: 13
10 years 5 months ago #127327
by tex14
Replied by tex14 on topic Re: extra field front-end editor default dynamic value
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
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 5 months ago #127328
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: extra field front-end editor default dynamic value
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.