Keyword

extra fields

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 years 4 months 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.

More
4 years 4 months ago #176603 by JoomlaWorks
Replied by JoomlaWorks 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... :)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 years 3 months 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.

More
4 years 3 months ago #176636 by JoomlaWorks
Replied by JoomlaWorks on topic extra fields
Yes, but I need a URL to the actual page in your site. :)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 years 3 months 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.
krotoszyn112.pl/pozary/item/1791-nowa-obra-grozny-pozar-nasypu-kolejowego

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

More
4 years 3 months ago #176651 by JoomlaWorks
Replied by JoomlaWorks 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?

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 years 3 months 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.

More
4 years 3 months ago #176662 by JoomlaWorks
Replied by JoomlaWorks 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; ?>

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Sebastian Kalak
  • Sebastian Kalak's Avatar Topic Author
  • Offline
  • New Member
More
4 years 3 months ago #176668 by Sebastian Kalak
Replied by Sebastian Kalak on topic extra fields
Went. It looks perfect.
effect ->> 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.

More
4 years 3 months ago #176674 by JoomlaWorks
Replied by JoomlaWorks on topic extra fields
You're welcome Sebastian :)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum