Keyword

extra fields

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 months 1 week ago #176586 by Sebastian Kalak
extra fields was created by Sebastian Kalak
I warmly welcome,

I have a problem with the extra fields. Currently, I have a multiple-choice list set in the back. And now I would like them to be displayed one below the other on the front side, and there is a comma between them.

Can you count on any help?

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 months 6 days ago #176603 by Fotis
Replied by Fotis on topic extra fields
This basically requires some CSS code to style the output of the multi-select extra fields.

A URL to such a page (K2 item) would help... :)

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 months 2 days ago #176631 by Sebastian Kalak
Replied by Sebastian Kalak on topic extra fields
I warmly welcome,
Can you ask for an example of how to use this CSS coding?
I am not a programmer, so I am looking for a solution. Surely the CSS code alone is enough to make it work?

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 months 1 day ago #176636 by Fotis
Replied by Fotis on topic extra fields
Yes, but I need a URL to the actual page in your site. :)

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 months 19 hours ago #176642 by Sebastian Kalak
Replied by Sebastian Kalak on topic extra fields
'Supplementary fields' > 'Multiple-choice list' are added under dh Szymon Sikora.

I want to introduce a similar application as above, which was added to the text editor manually.
http://krotoszyn112.pl/pozary/item/1791-nowa-obra-grozny-pozar-nasypu-kolejowego

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 months 4 weeks ago #176651 by Fotis
Replied by Fotis on topic extra fields
Your site's template is obviously using a template override for K2's item.php. Can you share that file in the forum so I can propose the changes to be performed in order to get these values displayed in different lines?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
3 months 4 weeks ago #176659 by Sebastian Kalak
Replied by Sebastian Kalak on topic extra fields
Please, this file is attached.
Attachments:

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 months 4 weeks ago #176662 by Fotis
Replied by Fotis on topic extra fields
Replace this:
        <?php if($this->item->params->get('itemExtraFields') && isset($this->item->extra_fields) && count($this->item->extra_fields)): ?>
        <!-- Item extra fields -->
                <?php foreach ($this->item->extra_fields as $key => $extraField): ?>
                <?php if($extraField->value != ''): ?>
                    <?php if($extraField->type == 'header'): ?>
                    <h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
                    <?php else: ?>
                    <strong><?php echo $extraField->name; ?>:</strong><br />
                    <?php echo $extraField->value; ?>
                    <?php endif; ?>
                <?php endif; ?>
                <?php endforeach; ?>
            <div class="clr"></div>
        <?php endif; ?>

with this:
        <?php if($this->item->params->get('itemExtraFields') && isset($this->item->extra_fields) && count($this->item->extra_fields)): ?>
        <!-- Item extra fields -->
                <?php foreach ($this->item->extra_fields as $key => $extraField): ?>
                <?php if($extraField->value != ''): ?>
                    <?php if($extraField->type == 'header'): ?>
                    <h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
                    <?php else: ?>
                    <strong><?php echo $extraField->name; ?>:</strong>
                    <br />
                    <?php if($extraField->type == 'multipleSelect'): ?>
                    <?php
                    	$values = explode(', ', $extraField->value);
                    	foreach ($values as $value): ?>
                    <?php echo $value; ?><br />
                    <?php endforeach; ?>
                    <?php else: ?>
                    <?php echo $extraField->value; ?>
                    <?php endif; ?>
                    <?php endif; ?>
                <?php endif; ?>
                <?php endforeach; ?>
            <div class="clr"></div>
        <?php endif; ?>

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
3 months 4 weeks ago #176668 by Sebastian Kalak
Replied by Sebastian Kalak on topic extra fields
Went. It looks perfect.
effect ->> http://krotoszyn112.pl/pozary/item/1791-nowa-obra-grozny-pozar-nasypu-kolejowego

Thank you for your help because I really couldn't handle it on my own.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 months 3 weeks ago #176674 by Fotis
Replied by Fotis on topic extra fields
You're welcome Sebastian :)

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum