Here is my structure. Custom type:Stock, Repeated field under Stock: Wine Stock
Template to display sigle "Stock" (hidden link)
it contains:
1. "Field and Text",
2. "Edit" link (hidden link)
In this template, it has "stock" edit form and repeated field group edit form
3. a view "Stock-Repeated-wine stock view" (hidden link)
Inside this view, it uses a template to display the repeated fields (named "Stock-inner-wine stock", url hidden link)
Question
1. in the "edit" link template, How can I hide the Stock form? I just want user only to see and edit repeated field group. I can't remore stock form from the template, otherwise the "Edit" link won't show on the front-end.
2. when I click into the edit link, for example hidden link I add a record here. Why in the front end it shows different format. The field I added from WordPress admin it has grey background. The field I added fron edit link doesn't have grey background.
Hi,
Thank you for waiting.
1. in the "edit" link template, How can I hide the Stock form? I just want user only to see and edit repeated field group. I can't remore stock form from the template, otherwise the "Edit" link won't show on the front-end.
- To hide the second form on the page (i.e. "Edit Stock"), you can include the following CSS code in the "Edit Stock" content template's "CSS editor":
( screenshot: hidden link )
.entry-content .wp-block-toolset-cred-form:nth-of-type(2) {
display: none;
}
2. when I click into the edit link, for example hidden link I add a record here. Why in the front end it shows different format. The field I added from WordPress admin it has grey background. The field I added fron edit link doesn't have grey background.
- I think we've discussed this point in another ticket as well.
If you'll go to the edit screen of the post "NSW-Sydney-Blacktown" and check the "RP-Stock-Wine" field entries in the repeating field groups, you'll see that the ones which are showing with a grey background have "Preformatted" style selected.
( screenshot: hidden link )
As a result, text from those fields is shown in the front-end wrapped inside the "pre" tag. To fix, you can select "paragraph" formatting for the text in those fields too.
regards,
Waqar
We haven't discussed this point before. Last similar is that the text doesn't have line break. Yes, both of them are caused by "Paragraph" and "preformatted", but they are different issue.
Actually I found that it is able to use "Block" to display repeated field group in an archive. So that I don't have to spend time to learn "View". I don't complain. it is all good now.
Thank you.