HomeDocumentationAPI Reference
Getting StartedAPI ReferenceHelp CenterVideo Tours

Setting Email Requirement

When a user creates a new feature request or adds a comment, they are asked to enter their email. You can use this method to set whether this email is required or not. This method takes a boolean for its first argument (whether the requirement is true or false) and enums for the second argument (for comment or new feature). More than one enum can be passed.

Method

FeatureRequests.setEmailFieldRequired(true, for: [.newFeature, .addCommentToFeature])
[IBGFeatureRequests setEmailFieldRequired:YES forAction: IBGActionTypeRequestNewFeature | IBGActionAddCommentToFeature]
FeatureRequests.setEmailFieldRequired(boolean, ActionType.REQUEST_NEW_FEATURE);
FeatureRequests.setEmailFieldRequired(true, [Instabug.actionTypes.requestNewFeature]);
cordova.plugins.featureRequests.setEmailFieldRequired(
                    true,
                    [cordova.plugins.featureRequests.actionTypes.requestNewFeature],
            function () {
                console.log('Email requirements set successfully!');
            },
            function (error) {
                console.log('Email requirements were not set - ' + error);
            }
        );
//iOS
IBGFeatureRequests.SetEmailFieldRequired(true, IBGAction.RequestNewFeature);

//Android
FeatureRequests.SetEmailFieldRequired(true, Com.Instabug.Featuresrequest.ActionType.RequestNewFeature);
FeatureRequests.setEmailFieldRequired(false, [ActionType.requestNewFeature]);
Email Parameters:

//New Feature
.newFeature
//New Comment
.addCommentToFeature
//New Feature
IBGActionTypeRequestNewFeature
//New Comment
IBGActionAddCommentToFeature
//New Feature
ActionType.REQUEST_NEW_FEATURE 
//New Comment
ActionType.ADD_COMMENT_TO_FEATURE
//New Feature
Instabug.actionTypes.requestNewFeature
//New Comment
Instabug.actionTypes.addCommentToFeature
//New Feature
cordova.plugins.featureRequests.actionTypes.requestNewFeature
//New Comment
cordova.plugins.featureRequests.actionTypes.addCommentToFeature
//iOS
//New Feature
IBGAction.RequestNewFeature
//New Comment
IBGAction.AddCommenToFeature
  
//Android
//New Feature
Com.Instabug.Featuresrequest.ActionType.RequestNewFeature
//New Comment
Com.Instabug.Featuresrequest.ActionType.AddCommentToFeature
//New Feature
ActionType.requestNewFeature
//New Comment
ActionType.addCommentToFeature