How to skip intro.js for a hidden field and conditional display elements - hidden

We have hidden fields which displays conditionally in asp.net form . How to handle this in intro.js implementation.
intro for Hidden fields are also displaying

Related

Editing of django form with primary key fields

I have a django model form for which I allowed partial form save since its a long form. Now I want the user to come back and complete the form later.
There is one hindrance however that my database cannot accept duplicate entries with same primary key. So should I remove primary key in my database to solve this or is there another way to make it possible? Suggestions please.
Why not keep only one row per user for that form? Just add one boolean field to check whether the form is submitted or is a draft. Something like is_submitted=models.Boolean(default=False). Keep updating the row with the new values on each partial save (a separate button for Save or an AJAX call for auto save).
When the form is submitted, just mark the field is_submitted = True and perform whatever actions you want after that.

How can I access list values in a WFFM list field?

I'm trying to make a poll results page with the results from a WFFM form. I initially took all the entered data(using AnalyticsFormsDataProvider), queried it, and then displayed the results. However, if no one votes for a particular answer, it wouldn't be in the entered data so it wouldn't show.
I want to display that the field had 0 votes, so now I'm trying to compare the possible answers to the queried list. However, I can't seem to find a way to access the values of the list items. Does anyone know the class those values are stored in and/or how to access them?
I'm using WFFM 8.1 rev. 151217 (Update-1) with MVC. It's a radio list field if that makes a difference from the other list fields.
Thanks,
You are able to get WFFM field as regular Sitecore item via standard API.
Available list items values are saved in "Parameters" and "Localized Parameters" fields. You can use Sitecore.Form.Core.Utility.ParametersUtil from Sitecore.Forms.Core to parse values saved in these fields.
This data is stored on your Radio List Field's Item in the fields Parameters and Localized Parameters.
If your code is within the Form's SaveAction or a Validator you will have access to the Field in the for AdaptedResultList args the SaveAction or via this.classAttributes["fieldid"] for the Validator. That will be enough for you to get the Radio List Item and then the Parameter fields.
If your code is not in a SaveAction / Validator I recommend passing the Form Item into your code possibly by Datasource and then retrieving the Radio List Item from that.
Finally the Items of the your Radio List field is stored in the format
<item><item>
If your radio items are actually items you will want to parse them using a regex
var regexItems = new Regex(#"<item>(.*?)</item>".ToLower());
var itemNodes = regexItems.Matches(FieldItem["Parameters"].ToLower());
Then you should be free to play with the list for your poll

Can I disable (not remove) a particular row in a django-admin result?

I am using dfrdmn's neat hack to add a summary row to a Django admin view. Briefly, it overrides the ChangeList for the ModelAdmin to append a new item to self.result_list._result_cache
However, this row is treated like other rows in that:
it has a selection box (for performing actions on it)
it has clickable link fields (for opening the edit view)
it has editable fields (for same-page edits)
it is considered part of the result_list when clicking Save (which results in an error)
How can I disable all of these so that the row is view-only, not selectable and ignored when saving?
As a bonus, displaying nothing for the "Like" field would be nice but is a low priority. (It's a NullBooleanField.)

django form with multiple choice field with potentially infinite choices

I have a model with a many-to-many field that will expand as the user adds more entries for the model. In the form template if I use the conventional {{ form.field }} I get a multiple choice select as is expected, but the problem that will quickly become apparent is when there are 10, 100, 1000 or more choices. What I'd like to provide in the form is a search field where the user can search through all available entries and via AJAX return entries matching their search criteria where they can then select the individual entry choices to be saved in the database.
I'm assuming I will have to manually render the multiple choice form field, but after hours of research I cannot find an example of this anywhere online. Is there an example that exists and I just haven't been able to find? How is one supposed to manually create a form with a multiple choice field in Django? Or am I going about this all wrong?

Making hidden field visible when another field is used

I am trying to create a section in my models code that allows me to add a value only when the previous field is selected.
The goal of the code is to do the following
Have a null or blank option
Select an option from the tuple
Showing the new field option
The example of what I am looking to do is add a warranty to an item in my model. I am trying to make a date field (or a charfield that uses a date format) that only appears when an option is selected (i.e. a date field is available when the 30 day warranty is selected) otherwise the date field should be hidden (i.e. none is selected, so date field does not show)
Any suggestions, workarounds are welcomed
This is in Django Admin only