SID-01067: Edit tables in template form textarea
| Status: |
Answered |
TWiki version: |
4.3.0 |
Perl version: |
5.6 |
| Category: |
CategoryPlugins |
Server OS: |
Unix VMWARE |
Last update: |
10 years ago |
Is it possible to have textarea(s) in my template form contain "edittable" tables? I can't seem to get this to work...
If not, is there an option where I could do this outside of textareas?
Ideally, I'd like to have the META data read in and populate these tables, and have them be "editable" via the edittable plugin..
currently, we collect version information and store it in textareas, which the users have to enfer in a specific format (not very cutting-edge, and a real sore spot with users)... My boss is more than a little anxious for me to get an answer for this, and I don't feel my efforts are getting anywhere...
so, ideally, I'd like to have edittable tables as part of my template form... they'd be "fed"/populated by the data in META now, and would (in my "dream" scenario) be "editable" after they're read in from the META data...
does this sound do-able? I've been dutifully trudging thru support docs, etc., and haven't hit on anything... I've been on this for a while now, and I would like to be able to offer a solution...
the data for this would is currently stored in textareas, with version info as this example:
Oracle;;v10.g;;12/31/2010;;approved
I'd like to be able to offer users the option of editing this data as part of the template form, but it's looking like this is a no-go...
any ideas?
thanks,
Roy Holliday
--
RoyHolliday - 2010-12-23
Discussion and Answer
If I understand correctly you want to create new topics based on a template that has an edit table, and feed data into the edit table. So, once you have created the topic, users can use the edit table.
For the first step, you can hand-craft an HTML form in a topic that asks for the fields you want to push into the edit table fields. The form action is the save script, hidden input fields specify the template topic and topic parent. To push values into a table cell of an edit table you can use URLPARAM. For example, you have an input field named
Phone, then add this into the table cell of the template topic:
| %URLPARAM{Phone}% |.
Details in
TWikiTemplates,
TWikiScripts,
VarURLPARAM.
--
PeterThoeny - 2010-12-23
OK, I think I follow you... If I do this form (<form action=...."), it will be embedded in the code for the template form, correct (that's how I envision it)?
If so, then when a request for the topic is received, the form would be executed, and provide the input to the table? I'm presuming that the HTML form gets invoked before the template form...
I'm not quite sure how the URLPARAM works to get the data to the source (the META file of topic source), I'm still reading that... I think I follow so far...
--
RoyHolliday - 2010-12-26
No, the HTML form is in a separate page, not the template topic.
May be best to look at an example: The
SupportForumMaintenance list the relevant pages that make up the Support forum on twiki.org. The
AskSupportQuestion contains the HTML form. When a user submits the form, the
WebTopicEditTemplate is used as the template. The HTML form asks for a textarea named "question". The template topic has a
%<nop>URLPARAM{question}% embedded. That is, whatever the user enters in the texarea gets pushed into place of the URLPARAM in the template topic.
--
PeterThoeny - 2010-12-26
Peter,
I tried a few shots at this, but wasn't too successful... I'm still trying...
I've included the template form and accompanying source (META) file that I'm using... I was wondering if you could just take a look and give me an opinion on whether this is conceptually possible...
What I'm looking for: in the template form, there's a field called "Decisions", and the data from the source file populates this... What I'd like to do is be able to define this field as a table, using edittable, and have the source data populate the table, then allow it to be editable... As of yet, I've not been able to accomplish this...
Not looking for someone to code for me, just want a "proof of concept"... I'm really up against the wall on this...
I might also be amenable to hiring some Twiki development support, as well, if it does turn out that it's possible, and it's not something I can grasp fast enough...
I'd appreciate any input/etc....
Roy Holliday
--
RoyHolliday - 2011-01-22
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2011-05-02
Can this thread get picked up? I believe I'm having the same issue.
I use a lot of TWiki forms and am trying to pull a textarea formfield from one page into a search on another page. This textarea includes a TWiki form table, but this table just shows up as a string of text when my Search pulls it in.
Any way around this?
--
Jared Fritz - 2013-07-12
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
Peter Thoeny - 2015-12-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.