Custom field values

  • Leah Shanley
  • Topic Author
  • Offline
  • New Member
  • New Member
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
Attachments:

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

More
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

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

  • Leah Shanley
  • Topic Author
  • Offline
  • New Member
  • New Member
More
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.

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

Moderators: Tuan Pham Ngoc