SSL Labs ScoreSecurityHeaders.io ScoreHSTS Preloaded

Log in to participate

There is no cost to join RicheyWeb, and membership is a requirement to submit bug reports and participate in the support forums.

× Extension Discussions

Fields - subform render into article

More
2 years 3 months ago #2227 by GetToNet
Load template: No;
Multiple: false

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

More
2 years 3 months ago #2228 by michael
Check this out - let me know if this helps

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

More
2 years 3 months ago #2229 by michael
OK, that doesn't work with Joomla in its present state.

Joomla does not currently support nested repeatable subforms. The subform itself can be repeatable as long as none of the fields inside of it are repeated, or the subform can contain repeatable fields as long as the subform itself is not repeated.

In Joomla 3.9.0 there is a PR to add this functionality - but it's not ready.

Give me an example of the type of data you want to store, and maybe I can tell you how to do it.

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

More
2 years 3 months ago #2230 by michael

GetToNet wrote: Load template: No;
Multiple: false


Why multiple: false? I thought you wanted multiple items.

Set multiple:true and make this form XML:

<?xml version="1.0" encoding="UTF-8"?>
<form>
<field type="text" name="value" default="" label="test-form-value" description="" />
</form>

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

More
2 years 3 months ago #2231 by GetToNet
I did look and listened very carefully.
I've been playing with this whole day and I understand everything you said in the video.

BUT, you did not tell anything about multiple fields.
"The subform itself can be repeatable as long as none of the fields inside of it are repeated, or the subform can contain repeatable fields as long as the subform itself is not repeated."
I understand this as well, but I'm not trying any of these.

Let's first try to fix error in the DCMI xml and php that we talked about.

I have this repeatable field (type SUBFORM, that's tricky):
<field type="subform" name="contributor" multiple="true"
layout="joomla.form.field.subform.repeatable-table"
label="SUBFORM_CONTRIBUTOR_LABEL"
description="SUBFORM_CONTRIBUTOR_DESC" >
<form>
And in php it's supposed to render this way:

foreach((array)$data->contributor as $contributor) $doc->addCustomTag('<meta name="dc.contributor" content="'.htmlspecialchars($contributor).'" />');

but it's not rendering. All other (simple) fields are good, but this one returns empty. I saw in the video that you have dcmi.xml in your fields, please check.

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

More
2 years 3 months ago #2232 by GetToNet
Other one that I've been playing with is simple.
XML:
<form>
<field type="text" name="gettonet" default="" label="Gettonet" description="Opis" />
</form>

No template, multiple:true.
Renders in the article very fine in the table form. Ok, I can live with that and style it to fit me.

BUT, the point is to show it in the head metadata also!
So I'm struggling to get the output with my template so I can put in the <head> but I can't get it to work, that's where I need your (very appreciated) help.


Simply put: I need repeatable simple text field (multiple:true) that would render in the head as well wrapped by the same tag, for example:

<meta name="my-repeatable-field" content="VALUE1" />
<meta name="my-repeatable-field" content="VALUE2" />
<meta name="my-repeatable-field" content="VALUE3" />

etc

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Powered by Kunena Forum