I have a form where you can write a question.
The worry that I have, is that when I choose to write another question, it erases the previous question.
Is it possible to validate the previous question before you can write another one?
Thanks in advance.
Cordially.
My file.
Related
I would like to set up a survey/form that I can repeatedly send to the field (I'm working in NGO business) with mainly open answer questions. The form should be done in a way that it always already shows the answers from when the form was filled the previous time. Anyone knows sth like this?
ODK and KoBoToolbox support that feature. It is not yet documented on XLSForm.org, but you can read more about it here: https://docs.getodk.org/form-logic/#values-from-the-last-saved-record
I have an application how this:
If i have that add each answer one to one (and select the question), the process for the user is very hard.
Is it possible create with MOST a new process more faster and easy for the user? how?
Did you consider removing the whole answer entity and adding an array field to the question instead?
we want to realize the following:
Generate PDF with Template,which means set value in AcroFields
Create a big details table (structure of table is also in template). In this progress, the details will occupy more than one page.
If the detail table is on multi pages, the header of the table should be also on top of the new page.
We found some examples on following website:
http://kuujinbo.info/cs/itext_template1.aspx
http://kuujinbo.info/cs/itext_template2.aspx
But the details the founction is omitted there.
Add content; the code for _do_form_fields(), _get_transaction_details(), and _transaction_summary() are omitted, since they only return strings to add to ColumnText. ColumnText is smart; each call to Go() renders as much text that will fit on the current page and returns a status code that tells you: (1) how much text (to write) is remaining, and/or (2) how much space is still available on the page. On each iteration you add text to the current page, call ColumnText.HasMoreText() to inspect the status, and then Document.NewPage() if necessary.
Is there anyone who had same situation before? We are appreciated that you could offer some tips or suggestions.
Thank you.
best regards,
Cheng Gong
You are already making a mistake in the first step of your requirements.
You say "Generate PDF with Template,which means set value in AcroFields."
The first part is OK: you want to generate a PDF with a template. However, this doesn't mean setting values in AcroFields. That's only one option. It's the option you take if you consider PDF being the digital equivalent of paper. The form is static: every coordinate is fixed. You just fill out data at the appropriate places. If the data doesn't fit the designated areas, you're out of luck. I already referred to chapter 6 of my book in a comment. You can also see how AcroForms work in a longer tutorial: https://www.youtube.com/watch?v=6YwDME0Fl1c (This tutorial is almost completely dedicated to creating a report from a data set.)
Another way to create PDF from a template is by using the XML Forms Architecture. In this case (if you have a pure XFA form), your PDF is a container for XML. You can then inject XML data into this form and the form will adapt itself depending on the data. A one-page form can easily grow into a 20-page document when filled out. This is explained in this video: https://www.youtube.com/watch?v=h0wzj84tnmw (Note that the video dates from 2012. The product I present has been finished and the results are much better now.)
Alternatives to this approach could be to create a template in HTML. I often refer to this solution as a poor man's XFA solution. This solution requires XML Worker. You can see an example in this video: https://www.youtube.com/watch?v=clWoDrEEl50
This is a general answer. I couldn't be more specific because your question isn't clear. You first need to make your mind up regarding the approach. Right now, you talk about AcroFields and at the same time about ColumnText. In the long tutorial, this is described as the hard way. See also the corresponding online samples. It is very confusing why you're asking a very difficult question before asking the simple questions. Unless of course, you already have the answer to those simple questions. If so, please share these answers.
I want to use the semanticvectors API. I am completely new at this. I want to make a program which takes some documents and searches keywords and returns the documents which are conceptually similar to the search keywords. I want to know if there is any document from which I can get all the function and their functionality description and from which I can learn or if there is any example to do so.
I have checked
https://code.google.com/p/semanticvectors/
and
http://semanticvectors.googlecode.com/svn/javadoc/latest-stable/index.html
but couldn't understand anything. Please help me. Thank you.
It is not clear what you want to do with SemanticVectors. Here is where you should start off with:
https://code.google.com/p/semanticvectors/wiki/InstallationInstructions
And for specific questions, it would be fruitful if you ask on project's forum itself:
https://groups.google.com/forum/?fromgroups#!forum/semanticvectors
I am building an application in ASP.NET, C#, MVC3 and SQL Server 2008.
A form is presented to a user to fill out (name, email, address, etc). I would like to allow the admin of the application to add extra, dynamic questions to this form.
The amount of extra questions and the type of data returned will vary. For instance, the admin could add 0, 1 or more of the following types of questions:
Have you a full, clean driving liscence?
Rate your drivings skills from 1 to 5.
Describe the last time you went on a long journey?
etc ...
Note, that the answers provided could be binary (Q.1), integer (Q.2) or free text (Q.3).
How would I allow the posting of 0, 1 or more random values from the form back to my code?
Any help would be greatly appriecated.
Thanks in advance.
PS. I asked a similar question regarding the storing of this data in sql, see here
You will need to use an EAV scheme for storage. For a discussion of the topic, along with common pitfalls and solutions, see Best Practices for Semantic Data Modeling for Performance and Scalability. Other alternatives are Sparse Columns and XML data type column, but I think EAV is superior most of the times.
You'll have to accomplish this using dynamic controls.
Basically you'll read the question list from your database, inject zero or more custom controls to emit the question(s) and accept the answer(s). Probably wrapped in a repeater.
On post back you'll have to rehydrate the dynamic controls so that you can get the values.
I have done this before when I worked on a survey tool.
So first of all you need to decide what questions type you'll have. I had SingleOption, MultiOption and FreeText type questions.
User logs into the admin screen and selects a type of question he wants to add. He then clicks on Add button, which submits a request to a controller/web service.
Controller looks at type of question and adds a record into the database.
Rough table structure below:
QuestionID | SurveyId | QuestionTypeId
2 4 1
This is your basic structure.
When you generate an interface for answering questions, you will retrieve all questions with a SurveyId = 4.
You will then write an HTML helper that looks at question type and generates an appropriate control.
When it comes to submitting a survey, or answers to your question, you will display all questions and answer fields in some div, say we call it "survey_questions". Inside this div will be a form which will contain all your questions and controls for answers (text inputs, checkboxes etc).
You will then submit this form through jQuery to a controller/web service. Controller/Web Service will read survey id and it will iterate through all submitted values.
You will then use these values to populate a table for storing survey results. I understand that this is very brief and abstract, but I have worked over a month on this, so if this is useful and you need further help, then please ask.
I found a great article that solves my problem.
You can find it here