[resolved] Custom Widgets - Add Text Dynamically (4 posts)

  1. 2olive
    Posted 3 years ago #

    Hi all! :-)
    I'm wondering if this is possible, maybe via jQuery.
    I'm developing a custom theme and I am able to write my own simple widgets that show some little info, inserted by the user.
    The widget I'm thinking of now should be able to show this information:
    room number + phone number
    As the rooms can be many, I should be able to input
    room 1 + phone no 1
    room 2 + phone no 2
    room 3 + phone no 3
    without dragging the widget 3 times in the sidebar. Anyone can help with this issue?
    Thank you

  2. Mads Phikamphon
    Posted 3 years ago #

    A quick and dirty solution:

    - Show 3 sets of fields (i.e. 3 x room number + phone number) in administration (when you drag the widget to the sidebar).
    - Only display sets of fields with values on the theme (i.e. if only 2 x room number + phone number have been filled out, show only those 2 sets of fields).

  3. 2olive
    Posted 3 years ago #

    Well... simple and effective...I didn't think about that! Thank you!

  4. 2olive
    Posted 3 years ago #

    I was thinking about this solution...Doing so, I must know how many rooms/phones are in the office.
    Maybe a simpler solution would be create a page with rooms and phone numbers and then putting the content of this page in the widget :-)

Topic Closed

This topic has been closed to new replies.

About this Topic