Giter Club home page Giter Club logo

gravityforms-repeater's Introduction

Hi there, my name is Kodie Grantham. Welcome to my GitHub page.

gravityforms-repeater's People

Contributors

bostondv avatar hostedpixel avatar jmslbam avatar kodie avatar marwzoor avatar rcooler avatar robertstaddon avatar webimage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gravityforms-repeater's Issues

Allow Zero Repetitions / Items

It should be possible to start with / allow a minimum of zero instances of a repeated section. In my case I ask for employment history, and require certain fields like date hired / left for each instance. Users without an employment history will be unable to fill out this form. I was able to work around this constraint by adding another field ("Have you been employed before?") and making all of the fields in the repeated section conditional, but that is cumbersome to manage and imposes constraints on the kind of conditional logic that can be used in the repeated fields.

Pre-populating checkboxes

Hi Kodie,

Could you please test or document how pre-populating checkboxes should work?

I can't figure out how to get them to pre-populate.

If it matters, I'm trying to get them to pre-populate on pages 1 and 2 of a multi-page form (two repeaters, one on page on, one on page 2, each with a checkbox field).

Thanks,
Michael Moore

tabindex="NaN" when gform_tabindex is false

Hi Kodie,
Thank you for this outstanding plugin, very useful!

I found the following issue:
For every GF I add add_filter( 'gform_tabindex', '__return_false' ); to disable the tab-indexes.

I noticed that this displays in the HTML as tabindex="NaN"

For example in
<select name="input_4-1-1" id="input_2_4-1-1" onchange="gf_apply_rules(2,[9,10]);" class="medium gfield_select" data-repeater-inputid="1" tabindex="NaN">

Best would to remove the tabindex attribute completely when gform_tabindex is false.

Kind regards,
RIan Rietveld

Do I need an extra library for jQuery().mask?

I'm getting errors "jQuery(...).mask is not a function" on gf-repeater.js, line 254.

Do I need to install an extra jQuery library for that to work or is it likely that I've broken something else locally? I'm using gravityforms-repeater Version 1.0.8.

Price Field inside repeater loses Currency option

Hello, I try to use repeater to make a register of a delivery, but this plugin not work in price field corretly... please make a review on this...

the currency when i set a numer field as currency it put the signals of current currency in the value, when this fiels inside repeater this not work, and a number field with calculation not recongnise this field anymore....

Thanks for any help...

Conditionial logica

Hi,

Is it possible to add conditionial logica to the repeater? because now the sub items of a logica arent visible but the trigger button is :(

New form displaying repeater values from previous entry

Sometimes when going back to the form after submitting an entry the repeater fields are pre-populated with the values which were submitted with the previous entry.

I'm using a simple repeater with a single line text input within it.

For example, if I submit the form with 3 repetitions of the input with values "one", "two", "three" the next time I load the form those 3 values will be pre populated in the the new form rather than being an empty repeater. If I reload the page the repeated is cleared to its default empty values.

Is there somewhere in the browser cache or database which stores repeater data which might not be getting cleared after the first form submission?

Thanks!

Lists and File Fields

I don't see these types in your list of supported fields, so I believe this is why they don't work. The file field doesn't allow for file upload and the button doesn't work.

The list field works on the frontend but the submission within email is garbage and gets chopped off.

Can you confirm these issues?

How can I pre-populate some repeater entries?

Is there a built-in way to pre-populate the repeater with some data?

It's working really well for submitting data on the site I'm building, now I'd like to add the ability for users to edit entries they've made previously.

I'd prefer to do it server-side, but it looks like if there's no baked-in method, then I could pass my values to the client with wp_localize_script, then use gfRepeater_setRepeater and populate the values manually with JavaScript....but, if there's a shortcut that'd be nice.

Date fields with input type Date Field have same ID

Date fields have three options for user input.

  • Date Field shows individual fields for Month/Day/Year
  • Date Picker shows a calendar popup for a single field
  • Date Drop Down shows three M/D/Y drop down fields.

If I use Date Field or Date Drop Down then all date input field parts get the same ID

The Month field has "input_3_3_1-1-1" and the Day field has "input_3_3_1-1-1" and the year field has "input_3_3_1-1-1".

Worse, add more entries to the repeater, the additional date fields continue to have the same "input_3_3_1-1-1" ID, even if they are in repeated group 2, 3, etc.

To repeat:

Create a repeater with a date field using Date Field or Date Drop Down and inspect the generated HTML. Click the plus to add repeated entries in your repeater. Inspect the generated HTML.

Conditional Open/Close Blocks

If would be useful if the opening and closing blocks themselves could be shown/hidden conditionally, in instances where you don't want to allow people to add any items.

Repeater fields are not displaying in notification emails

I created a few repeater fields but when I receive a notification email, none of the fields are showing up. Currently I have the notification message using the {all_fields} shortcode. Is there something different I need to do to get repeater fields to show?

Regression between 1.0.8 and 1.0.9 on multi-page forms

Hi!

I've got a multi-page form with a repeater on page 1.

When I submit my form using plugin version 1.0.8 the data saves correctly, but in version 1.0.9 I get empty values. Interestingly, it does show the correct number of empty values, just not the values themselves.

The form I'm testing this on is extremely simple. Page one is just a repeater with a single text field in it. Page two has a text field and a radio button.

submitted_with_version_1 0 8
submitted_with_version_1 0 9

Thanks!

Multi Page forms seem to be broken

Hi,
I have a large multi page form. It seems the the repeater addon breaks the multi page functionality (can't navigate to the previous/next page via buttons. Have to hit enter in a field to switch to the next page). I also get some javascript error from the plugin in jquery.postcaputer.min.js:

'''
Uncaught TypeError: Cannot read property 'length' of undefined
'''

Would be great if you knew how to fix it....

Why does gfRepeater_getChoiceValue return a label instead of a value?

Seems like this code:

var id = this.id;
var label = jQuery(this).siblings('label').first().text();
value.push(label);

Should just be:

value.push(jQuery(this).val());

The value and label will typically be the same, unless the user checks the "show values" checkbox. I believe that checking the value is the correct thing to do and should always work.

should_be_value_maybe

Undefined index: conditionalLogic

Small issue that is throwing a notice.

I have disabled ajax on the form as instructed and I have noticed that if I add custom Add and remove markup to the 'Repeater End' it throws a bunch of 'Undefined Index: conditionalLogic' notices when I click the Add button.

the html I have added to each is
<button class="btn btn--tiny btn--primary">Add Another Timesheet</button>
and
<button class="btn btn--tiny btn--secondary">Remove Timesheet</button>.

Without custom code in there it works without error.

warning text appears on submission

Everytime I submit a form I get an error message that displays on the confirmation page. The form goes through but displays this code at the top:

Warning: substr() expects parameter 1 to be string, array given in /home3/sjgas/public_html/contractorsonly/wp-content/plugins/repeater-add-on-for-gravity-forms/class-gf-field-repeater.php on line 143

Can you lend any insight as to why this is happening?

Uncaught TypeError: jQuery(...).mask is not a function

First of all thanks for the plugin, it seems awesome. But I'm not able to test it already because I got the following error:

Uncaught TypeError: jQuery(...).mask is not a function

Thanks already! Best Regards,
Nick

JS error when you have a required date field with a calendar icon

I'm getting error messages in gf-repeater.js on line 290

 if (childRequired) {
    var splitName = newInputName.replace('.', '_').split(/(_|-)/);

newInputName is undefined.

It looks like this is only happening when you have a required date field which has an icon (calendar or custom) set. It seems that the icon image URL is put in a hidden field which has no name property.

This results in inputId having a value, but inputName being undefined on lines 227/228, then since the date field is required, gf-repeater.js tries to split the undefined newInputName.

It seems that that this only causes an actual problem sometimes. One of my forms won't advance to the next page because of the error, but another one of my forms will. Both are multi-page and neither are using ajax. The error shows up in the console in both cases. I haven't figured out what's different between the two forms. For the time being I just edited gf-repeater.js to check if(newInputName && childRequired).

Conditional field has to be inside of repeater

I have a section inside of the repeater which I only want to show if a field, which is outside of the repeater has a certain value.

It seems that the conditional logic checks only allow me to pick fields inside the repeater, otherwise the form fails to render with the message: "child is undefined".

Show as many repeated instances as there is pre-populated data

Right now even if I pass pre-populate data for a repeater to be repeated multiple times it only repeats once.

Eg. if I have input1=asdf&input2=qwer&input3=zxcv

When I click the plus button to add additional repeater sections the pre-populated data shows up in the new sections.

One of the most common use cases for pre-populating data is probably for users to re-edit data they've entered previously. In such a case, the user will expect to see the data they entered initially. If I pass in pre-populate data, I think it should show up on the screen.

Feature Request: A way to distinguish which input a value came from in multi-input fields

I've got some name and address fields in a repeater. if a user doesn't fill out one of the optional name or address parts (eg. Name Suffix, or Address Line 2) then those empty values don't get included in the serialized string that's stored with the form.

When trying to de-serialize these values to pre-populate or otherwise use the values, this results in ambiguity about which input a value corresponds to.

It would be convenient if the serialized string preserved the input name somehow.

See the attached screenshot for a visual explanation.

Eg.
seriialized_values

Exporting.

When I export a form's entries in to Excel any data that was in a repeater field is all placed in a single cell. How do I export to Excel allowing the data in the repeater field to appear in the corresponding separate rows?

Feature Request: Hidden field support

Hi Kodie,

Thanks for the nice plugin. Are hidden fields supported? They're not on the list of supported field types but should be able to be handled in a very similar fashion to regular input fields.

Thanks,
Michael Moore

Repeater Fields causes errors on Gravity Form

Whenever I add a repeater field into a form, the form starts getting "messed up"... and the repeater buttons don't even work (tried in both preview mode and on the rendered form).

For example, the progress bar starts showing up on my multipage form, when I set it back to "steps" and save the form, it switches back to progress bar and doesn't save changes to the form. There are a couple other small quirks too but overall the repeater plugin basically breaks my form. When I disable the repeater plugin, things go back to normal.

There are no javascript errors showing up either. Have you seen this kind of behavior before? Would really like to get the repeater field working and it looks like a great plugin other than this. Thanks for your help!

Uncaught TypeError: Cannot read property 'required' of undefined

Everything was working fine with the plugin (Which is clutch, by the way. Super helpful) until I added some conditional logic and this JS error broke the entire form. The form now has an inline display: none applied to it.

The culprit seems to be this line:
if (childInfo['required']) { childRequired = true; }

Errors after update

Hi Kodie,

after update your plugin I get the following errors:

Notice: Undefined offset: 0 in /Applications/MAMP/htdocs/grell_neu/wp-content/plugins/repeater-add-on-for-gravity-forms/class-gf-field-repeater.php on line 512

Warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/grell_neu/wp-content/plugins/repeater-add-on-for-gravity-forms/class-gf-field-repeater.php on line 556

I'll get these errors on a form which is not using your repeater plugin! On the form which is using your plugin are no errors.

php 5.6.10 breaks the /wp-admin/plugins.php page

hello, when I have php 5.6.10 activated the plugin creates a weird bug...

when on my wp-admin / plugin list page /wp-admin/plugins.php, the list breaks when getting to this plugin item. the list stops to display so I can't see plugins that are alphabetically after this one.

downgrading my php version to 5.5.26 resolves the bug.

on 5.6, the plugin still works but its really annoying that I cant manage plugins from the admin when this one is active. there is no php errors in my logs...

im in development phase right now so I can easely switch php versions, but it wont be so easy next week when we put the site online...

Please let me know if you have a solution for the plugin to work with ulterior versions of php.

thanks

Raw Email Data Output

Hi Kodie,
I seem to have encountered another issue with the plugin :-/

I am trying to generate a Raw Text Email, but it seems the plugin does not support this. Here is my Notification code, with Autoformatting disabled:

xxx {[Field Name]:[field_id]}
Single Line: {Single Line:1}
{Repeater:6}
Paragraph: {Paragraph:2}
Radio: {Radio:3}
{Untitled:7}
List: {List:4:}
Col: {Column List:5:}
File: {File:8}

I'm using a filter to generate text emails:

// Set Gravity Forms to text Emails
add_filter( 'gform_notification', 'change_notification_format', 10, 3 );
function change_notification_format( $notification, $form, $entry ) {

    // change notification format to text from the default html
    $notification['message_format'] = 'text';

    return $notification;
}

Emails arrive like this:

xxx {[Field Name]:[field_id]}
Single Line: dsaad
a:2:{i:1;a:2:{i:2;a:1:{i:0;s:5:"sddsa";}i:3;a:1:{i:0;s:5:"Other";}}i:2;a:2:{i:2;a:1:     {i:0;s:13:"dasdsaasdsads";}i:3;a:1:{i:0;s:5:"other";}}}
 Paragraph:  
Radio: 

List: sdads
Col: sad,ads,dsa
File:

Conditional logic in the repeater works for all repeats

I've got a section (image below, section is called Practitioner Details (delegates)) in a repeater that should only show if a radio button is selected as yes:

screen shot 2016-04-13 at 9 46 07 am

Once there's a few repeats, you'll get mixes of "yes" and "no" selections. As soon as there is one "yes" selection all of the sections are enabled.

screen shot 2016-04-13 at 9 45 52 am

This is using the latest dev version.

Conditional Fields and the Repeater

Hi, I'm unsure if this is covered elsewhere, but when I use the plugin to repeat a group of fields with conditional logic, the hidden fields no longer show given the proper condition.

Arry shows in email

Hi,

When get the values in the notification email it looks like the image i attach. The Array are visible in the email before the tables where the value is. Anyone know what the problem is? It worked before but when i updated wordpress and gravityforms to the latest version i starting to get this error.
skarmavbild 2016-05-04 kl 09 59 46

Use of GF-Repeater and CFDB

Hi Kodie,
I am trying to produce a formatted table of entries from a GF which has both non-repeated fields and repeated fields. The data for the repeated fields seems to be stored in the Wordpress database in an encoded form ["# id, lead_id, form_id, field_number, value
'3', '1', '1', '1', 'a:1:{i:1;a:4:{i:9;a:1:{i:0;s:4:"1234";}i:10;a:1:{i:0;s:22:"Where Your Treasure Is";}i:14;a:0:{}i:15;a:0:{}}}'] in table wp_rg_lead_detail. Do you know of any way I can produce a sub-table with this repeated data expanded into columns with the correct headers.
Any working examples would be greatly appreciated,
Cheers.

Conditional sections don't hide fields inside section

The GF way of doing sections is kind of weird, since there's no actual nesting, but all fields after a section are considered to be part of the section until the next section or page starts.

Outside of repeaters, conditionally hiding a section will hide all fields inside that section.

Inside a repeater just the section header itself seems to be hidden, the subsequent fields are still shown.

Product Field Support

While I recognize that product fields are missing from your supported fields list, I would like to help make them supported if at all possible.

Have you looked into the issue before? Do you have a suggested starting place?

No time rush on this, I'm just interested in contributing :)

radio buttons inside repeaters loses value

I noticed the radio fields inside a repeater loses the selected value when inside of a page, and using the "previous page" button.

when I duplicate the same field and move it out of the repeater, it works fine.
im using this component for a a project at work... would be awesome if you could fix it... its a bit of a show stopper for us.

Thanks

Issue with jQuery.captures and Page type confirmations

I've got a series of forms that are chained together. It's a several-hundred question scholarship application process, so each section is a form. Upon completion of one form the user is sent directly to the next form using the Gravity Forms Page type confirmation.

It seems that at least in a page type confirmation the jQuery.captures data is not cleared so values typed in one form overwrite values in a subsequent form if the field names match.

I have worked around this issue by appending an additional hidden field to the form which holds the formId. During initialization if the jQuery.captures formId doesn't match the current form ID, gfRepeater_submitted is not set to true.

// Initiation right away
jQuery(document).ready(function($) {
    gfRepeater_patchMask();
    var theForm = jQuery('.gform_wrapper form');
    var formId = jQuery('.gform_wrapper form').attr('id');
    theForm.append('<input type="hidden" name="the_hidden_form_id" value="' + formId + '">');
    theForm.capture();
    if (jQuery.captures()) { 
        // check if it's the same form
        if(jQuery.captures('the_hidden_form_id') == formId){
            gfRepeater_submitted = true; 
        }else{
            // console.log("Found old data, not counting as submitted");
        }
    }
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.