It is referenced in links.def "If you use &build_radio_field, it will make a <INPUT TYPE="RADIO"> tag", which I assume is in the admin interface. Is there anyway to also pull this into add_error.html, modify.html, etc., as opposed to manually building the <INPUT TYPE="radio"... code? I have found no reference to this, other than a mod to site_html_add_failure by Bobsie ( http://www.gossamer-threads.com/...um3/HTML/000993.html ).
Aug 22, 1999, 5:42 PM
Veteran / Moderator (3111 posts)
Aug 22, 1999, 5:42 PM
Post #2 of 3
Views: 1072
You could do it, but not in add_error.html. You would have to do it in the appropriate subroutine of site_html_templates.pl by adding this code to the template load code:
where $radio_button is the name you want to use in the <%...%> tag in the template, and $fieldname is the name of the field (defined in %db_radio_fields) you want the radio button for. Since the %db_radio_fields array is defined in both category.def and links.def, the array is available for use anywhere in Links, not just the admin screen.
I should note though, that you cannot do this for the error templates. For those, you need to know what was recorded by the user originally. So, you would have to change the call to:
where $value is the value the user entered on the add or modify form.
I hope this helps.
[This message has been edited by Bobsie (edited August 22, 1999).]
Quote:
$radio_button => &build_radio_field($fieldname),where $radio_button is the name you want to use in the <%...%> tag in the template, and $fieldname is the name of the field (defined in %db_radio_fields) you want the radio button for. Since the %db_radio_fields array is defined in both category.def and links.def, the array is available for use anywhere in Links, not just the admin screen.
I should note though, that you cannot do this for the error templates. For those, you need to know what was recorded by the user originally. So, you would have to change the call to:
Quote:
$radio_button => &build_radio_field($fieldname, $value),where $value is the value the user entered on the add or modify form.
I hope this helps.
[This message has been edited by Bobsie (edited August 22, 1999).]