This topic is locked

Editing <select> options

8/13/2008 4:07:47 PM
PHPRunner General questions
M
mawells author

In HTML you would create a drop-down field like:

<select name="choice">

<option value="1">some value</option>

<option value="2">another value</option>

</select>
I need to do that with PHP Runner. I can get the drop-down fields, but the value is the same as what the person using the form is viewing and I can't have that. The value posted must be different than the actual item viewed. Since I couldn't find how to "fix" this manually in all the scripts - I then created a table with two fields (not counting the ID field) and put what I wanted the viewer to see as an option in one field and the actual value to be posted in the other field. But I can't seem to get it to show the correct value - it either shows the value that I want posted or the value that I want displayed is posted.
Any ideas? (I know this is probably very simple, but I'm just not seeing it.)

J
Jane 8/14/2008

Hi,
I suppose you need to display one value in the dropdown and then insert another values to the field.

In this case just select diffrerent fields as Link field and Display field on the "Edit as" settingsdialog on the Visual Editor tab.

M
mawells author 8/14/2008

Hi,

I suppose you need to display one value in the dropdown and then insert another values to the field.

In this case just select diffrerent fields as Link field and Display field on the "Edit as" settingsdialog on the Visual Editor tab.


Well, I thought that was the answer - but when I view the table in list view, it displays the View data - I need it to post the value data. At this point I don't care if the viewer sees the actual posted value or not - they only need to see the view value when making the selection.
Here's the problem:

The website has pages like dc1250.htm - which is actually a php page that is calling in information from a table that is set to show in this site's section dc1250. But dc1250 is actually a product name to the client, while in the website it is now a section name for paperless recorders. We are trying desperately to keep the existing HTML file names for this client as we convert to a PHP content-managed system. So, to the website dc1250 simply means that this item needs to show on the dc1250.htm page. The client, who will be matching the items to show on this page does not view them as dc1250 section, but rather as "paperless recorder" section. So, we want them to "see" when they're assigning a section to the item "paperless recorders" but have "dc1250" post to the actual field.
When I did as you suggested and I ran the "test" - it seemed to display properly. I selected "paperless recorders" and "dc1250" showed as the selected value. However, after I built the section, "paperless recorders" continues to show as the value in the item list. (We're trying to match PDF files of data sheets, manuals, etc. to specific sections of the site.)
Any other ideas?

M
mawells author 8/14/2008

Nevermind - I think it's actually working. When I went to the website to see if the library item showed on the appropriate page - it did. So I'm guessing there's some code that is transforming the value to the "view value" instead of showing the actual value - but the program knows enought to select it and put it in the correct area.
Thank you so much for your help.