Dynamically change the position of fields frontend

More
10 years 9 months ago #43937 by gkhn
Hi there,

I want the user to be able to change the fields positions using frontend.

lets say I have an item type with blog post.

Sometimes user needs one of the blog post(single item) need to be slightly different than other blog posts.

usually he has
image | text next to image
description text area
another image
text area
second another image
conclusion text area
This is a usual blog item(template positions) that I set up.

He may want to place a highlighted text between different fields for example to warn his customers.

I can assign a text field to description position.

But the problem is what if the user needs it after the secondanother image position.

because the higlighted text field is assigned to description position only, the user will not be able to change the position and once submitted the highlighted text will appear where the description position is.

One workaround would be to create different text fields for each position for example
highligherfieldfordescriptionup
highligherfieldfordescriptiondown /incase he wants it after description
highligherfieldforsecond another image
highligherfieldforconclusion text area

Do you think this would solve the problem I am having or am I overkilling this?

The reason I am asking is there may be an easier option that I am overlooking maybe.
What do you think?

thank you for your time.

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

More
10 years 9 months ago #43972 by ggppdk
Hello

you can add jQuery sortable/dragable to a list that contains the fields
<ul>
<li>...</li>
<li>...</li>
<li>...</li>
</ul>

Google it, and then create position in your FLEXIcontent custom template that adds the fields inside a list

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 9 months ago #44085 by gkhn

ggppdk wrote: Hello

you can add jQuery sortable/dragable to a list that contains the fields
<ul>
<li>...</li>
<li>...</li>
<li>...</li>
</ul>

Google it, and then create position in your FLEXIcontent custom template that adds the fields inside a list

Regards


Thanks for that.

Just to make it clear.

Lets say i have an image field and I would like to hav a highlighter text to warn users regarding specific topic.
So in the template I will have

<ul>
<li>php call to image field</li>
<li>php call to highlighter</li>
<li>php call to description</li>
</ul>

Now when this is rendered I will have an unordered list. Will this be user friendly?

I mean the content(image and text fields) are inside this unordered list. THey are supposed to be under paragraph tag but instead I have list tags. Is this a good practice?

Plust I understand if i place the fields under each list item how is it possible to change them in the item edit form?

thank you

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.284 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline