3lvis Form Versions Save

The most flexible and powerful way to build a form on iOS

3.3.2

9 years ago

3.3.1

9 years ago
  • FORMLayout uses the collectionView bounds instead of the mainScreen bounds (#353)
  • Included FORMEmailFormatter, now email fields will not accept commas \o/ (#358)
  • Fixes an issue where formulas wouldn't be computed correctly when used in combination with dynamic fields (#364)

Others:

  • Improved Demos
  • Added code coverage
  • Added Gitter (chat support)
  • Improved README

Huge thanks to @Mutix for his contributions on this release, a big round of applause for him.

tumblr_inline_nmgrjxgmc01tr65ve_500

3.3.0

9 years ago

Hi again, we hope you're all having a fantastic week. On this release some very nice things were added, thanks a lot to @Mutix for this incredible contributions and taking Form from cool to awesome. Also thanks to @charbelhass who's been reporting issues and more importantly following them. Well that's it, let's get with the changelog.

  • We had support for date field types, now we also have support for time and date_time, just add any of this to your field type and everything should just work (#333)
  • Assets will be now copied automatically to your project when doing pod install (#339)
  • Fixed issues with validations, we've added tests for all the cases, this should be good now (#336)

Get it by running:

pod update Form

3.2.2

9 years ago

Get it by running

pod update Form

3.2.1

9 years ago

Get it by running

pod update Form

3.2.0

9 years ago
  • Support marking fields as initially hidden (Defined on #318 and fixed on #319 by the fantastic @matteocrippa)

You just have to add the hidden flag to a field in your JSON file:

{
  "id": "first_name",
  "hidden": true
}

If you want to show the field you can use a show field target:

[self.dataSource processTargets:@[FORMTarget showFieldTargetWithID:@"first_name"]]

Get it by running

pod update Form

3.1.0

9 years ago
  • Added a configuration block to provide a custom FORMGroupHeaderView or to customize the existing one
// FORMDataSource.h

typedef UICollectionReusableView * (^FORMConfigureGroupHeaderForItemAtIndexPathBlock)(FORMGroup *group,
                                                                                      UICollectionView *collectionView,
                                                                                      NSIndexPath *indexPath);

/*!
 * Provides a configuration block to optionally set up subclasses of @c FORMBaseFieldCell
 * the default behaviour just sets the field property to the cell.
 */
@property (nonatomic, copy) FORMConfigureCellBlock configureCellBlock;

The only requisite is that this view should be a subclass of UICollectionReusableView

3.0.1

9 years ago

This bug was introduced on 3.0.0 when refactoring FORMLayout

3.0.0

9 years ago

Tooltip/Info

  • Improved how tooltips/info work (the yellow thing that pops-up when you press a field that has a message)
  • [BREAKING CHANGE] We renamed subtitile to info everywhere to improve consistency

FORMDataSource

  • Removed several unused method and documented the remaining ones
  • Removed deprecated method
- (NSDictionary *)valuesDictionary;
  • [BREAKING CHANGE] We had a naming inconsistency since we moved from forms to groups

Before:

- (NSArray *)forms;

After:

- (NSArray *)groups;
  • [BREAKING CHANGE] In order to make the API more consistent invalidFormFields returns a NSDictionary instead of a NSArray

Before:

- (NSArray *)invalidFormFields;

After:

- (NSDictionary *)invalidFormFields;
  • [BREAKING CHANGE] Improved reset, before it wasn't working as expected and it was renamed from resetForms
  • [BREAKING CHANGE] Renamed several configure blocks and update blocks to be more descriptive

Before:

@property (nonatomic, copy) FORMFieldConfigureCellBlock configureCellBlock;
@property (nonatomic, copy) FORMFieldConfigureHeaderViewBlock configureHeaderViewBlock;
@property (nonatomic, copy) FORMFieldConfigureFieldUpdatedBlock configureFieldUpdatedBlock;
@property (nonatomic, copy) FORMFieldConfigureCellForItemAtIndexPath configureCellForIndexPath;

After:

/*!
 * Provides a configuration block to optionally set up subclasses of @c FORMBaseFieldCell
 * the default behaviour just sets the field property to the cell.
 */
@property (nonatomic, copy) FORMConfigureCellBlock configureCellBlock;

/*!
 * Provides a configuration block to optionally modify the group header view an instance of @c FORMGroupHeaderView
 * the default behaviour just sets the title and the delegate.
 */
@property (nonatomic, copy) FORMConfigureHeaderViewBlock configureHeaderViewBlock;

/*!
 * Provides a configuration block to optionally return a cell for a specific @c NSIndexPath
 * very useful when providing custom cells.
 */
@property (nonatomic, copy) FORMConfigureCellForItemAtIndexPathBlock configureCellForItemAtIndexPathBlock;

/*!
 * Provides a block that gets called every time a field gets updated
 */
@property (nonatomic, copy) FORMFieldFieldUpdatedBlock fieldUpdatedBlock;
  • [BREAKING CHANGE] Removed - (void)processTarget:(FORMTarget *)target; Use - (void)processTargets:(NSArray *)targets; instead
  • [BREAKING CHANGE] Renamed few methods to be more simple

Before:

- (NSArray *)invalidFormFields;
- (NSDictionary *)requiredFormFields;
- (BOOL)formFieldsAreValid;
- (void)resetForms;
- (void)validateForms;
- (CGSize)sizeForItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths;

After:

/*!
 * @discussion A method to retrieve invalid fields.
 * @return A dictionary of invalid fields where the key is the @c fieldID and the value the @c FORMField.
 */
- (NSDictionary *)invalidFields;

/*!
 * @discussion A method to retrieve required fields.
 * @return A dictionary of required fields where the key is the @c fieldID and the value the @c FORMField.
 */
- (NSDictionary *)requiredFields;

/*!
 * @return @YES if all the fields are valid
 */
- (BOOL)isValid;

/*!
 * Resets the values of all the fields
 */
- (void)reset;

/*!
 * Runs @c validate in all the fields, if the field is invalid it will show as red
 */
- (void)validate;

/*!
 * @return The size for the @c field at the given @c indexPath
 */
- (CGSize)sizeForFieldAtIndexPath:(NSIndexPath *)indexPath;

/*!
 * @discussion Safely reloads the fields at the given indexPaths
 * @param indexPaths A collection of indexPaths to reload
 */
- (void)reloadFieldsAtIndexPaths:(NSArray *)indexPaths;

We want to thank @matteocrippa for his contributions on this release :heart: :bouquet:


Note: We are going to continue to be very strict in following semantic versioning.

  • Mayor releases: breaking changes
  • Minor releases: backwards compatible changes or additions
  • Patches: bug fixes or other improvements

2.2

9 years ago
  • Improved tooltip behavior

Adding message to a FORMField now will display a tooltip when the field it's activated (becomes first responder). We refactored the tooltip so it works better, faster and stronger.

  • Added resetDynamicSectionsWithDictionary to FORMDataSource

This is useful when you need to reset the state of dynamic sections