- Posts: 210
- Thank you received: 3
How to display custom field of type radio?
- Patrick
- Topic Author
- Offline
- Elite Member
Less
More
4 years 1 month ago - 4 years 1 month ago #132884
by Patrick
How to display custom field of type radio? was created by Patrick
Hello
I use custom field of type radio fpr front end submision:
How can I display this field in form for frontend submission?
In Override of theme file /event/simple.php I have added
But it is not working. Using
gives textfield and not radio buttons.
How can I display radio buttons?
Thanks.
Patrick
I use custom field of type radio fpr front end submision:
Code:
<field name="field_waehrung" label="EB_FIELD_WAEHRUNG" type="select" default="CHF" required="true" class="eb-extrafield eb-dropdown validate[required]"> <option value="CHF">CHF</option>
<option value="EUR">EUR</option></field>
How can I display this field in form for frontend submission?
In Override of theme file /event/simple.php I have added
Code:
<?php
if ($this->config->event_custom_field)
{
foreach ($this->form->getFieldset('basic') as $field)
{
?>
<?php if($field->fieldname == "field_waehrung") : ?>
<?php echo $field->select; ?>
<?php endif; ?>
<?php } } ?>
But it is not working. Using
Code:
<?php echo $field->input; ?>
gives textfield and not radio buttons.
How can I display radio buttons?
Thanks.
Patrick
Last edit: 4 years 1 month ago by Patrick.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
4 years 1 month ago #132892
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to display custom field of type radio?
Hello
You do not have to customize the code at all. Just define the field properly, see documentation at docs.joomla.org/Standard_form_field_types
There is no select field type as you defined. If you want to have radio field, define a radio custom field type docs.joomla.org/Special:MyLanguage/Radio_form_field_type
Tuan
You do not have to customize the code at all. Just define the field properly, see documentation at docs.joomla.org/Standard_form_field_types
There is no select field type as you defined. If you want to have radio field, define a radio custom field type docs.joomla.org/Special:MyLanguage/Radio_form_field_type
Tuan
The following user(s) said Thank You: Patrick
Please Log in or Create an account to join the conversation.
- Patrick
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 210
- Thank you received: 3
4 years 1 month ago #132928
by Patrick
Replied by Patrick on topic How to display custom field of type radio?
Hi Tuan
Works, thanks.
Patrick
Works, thanks.
Patrick
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
4 years 1 month ago #132932
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to display custom field of type radio?
Great. Thanks for confirming
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 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.