- Posts: 8
- Thank you received: 0
Custom field values
- Leah Shanley
- Topic Author
- Offline
- New Member
-
Less
More
2 months 4 days ago #170837
by Leah Shanley
Custom field values was created by Leah Shanley
Hi
I am creating custom export functionality for my client who wants to export data in XML format.
My code looks something like this
for ....{
$particpant->addAttribute('State', $row->state);
....
}
This all works and I can obtain the data from state. The problem is I would like to assign a value to certain List box fields. The mark up out put is as follows using devtools
<select ...
<option value="Western Australia'">Western Australia</option>
<option value="New South Wales'">New South Wales</option>
....
</<select>
What I would like is this
<select ...
<option value="WA'">Western Australia</option>
<option value="NSW'">New South Wales</option>
....
</<select>
and obtain the value.
Is this possible?
My field is set up with the following (see attached)
Field Type: List
Values:
Western Australia
New South Wales
.......
Is this possible?
Thanks in advance.
Leah
I am creating custom export functionality for my client who wants to export data in XML format.
My code looks something like this
for ....{
$particpant->addAttribute('State', $row->state);
....
}
This all works and I can obtain the data from state. The problem is I would like to assign a value to certain List box fields. The mark up out put is as follows using devtools
<select ...
<option value="Western Australia'">Western Australia</option>
<option value="New South Wales'">New South Wales</option>
....
</<select>
What I would like is this
<select ...
<option value="WA'">Western Australia</option>
<option value="NSW'">New South Wales</option>
....
</<select>
and obtain the value.
Is this possible?
My field is set up with the following (see attached)
Field Type: List
Values:
Western Australia
New South Wales
.......
Is this possible?
Thanks in advance.
Leah
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
2 months 3 days ago #170843
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom field values
Hi Leah
It is not possible to have it works like that for Text custom field type. For your need, I think you should adjust the code which handle export to output the value instead of text instead
Tuan
It is not possible to have it works like that for Text custom field type. For your need, I think you should adjust the code which handle export to output the value instead of text instead
Tuan
Please Log in or Create an account to join the conversation.
- Leah Shanley
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 0
2 months 3 days ago #170845
by Leah Shanley
Replied by Leah Shanley on topic Custom field values
For my software I need those values but the user will need to see the friendly version. That's OK. I have adjusted my code to do an array lookup which works fine.
I appreciate your time in answering my question.
I appreciate your time in answering my question.
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.