Custom form field not getting passed through on the career portal

Forum for users and developers of Bullhorn's new REST API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
mistermanu
User
Posts: 1
Joined: Fri Aug 24, 2018 4:00 pm

Custom form field not getting passed through on the career portal

Post by mistermanu » Fri Aug 24, 2018 4:45 pm

Hello!
I have downloaded and setup the career portal v 2.6.0.
Everything is working fine except I want to add a zip field to the candidate submission form (when they apply for a position).
I have added the field and made it a required field however the info never gets passed to the bullhorn database where the application is processed.
I'm using the zip variable (all lowercase) but I've tried many variations like addressZip, candidateZip, etc...

All of the modifications I've made are on app.js and modal.js. On app.js I've modified the form template by adding this:

Code: Select all

      
      		<div class="form-field">
                        <div class="input"><span class="required">*</span>
                            <input type="text" name="zip" value="" data-ng-model="modal.ApplyService.form.zip" data-i18n-attr="{placeholder: \'modal.zipPlaceholder\'}" required="">
                        </div><span class="error" data-ng-show="applyForm.zip.$dirty || applyForm.$submitted"><span data-ng-show="applyForm.zip.$error.required">{{ \'modal.zipValidation\' | i18n }}</span></span>
                    </div>
                    
and also added the zip info for the applyService section as such:

Code: Select all

	        key: 'form',
	        get: function get() {
	            return this._.form || (this._.form = {
	                firstName: '',
	                lastName: '',
	                email: '',
	                phone: '',
	                zip:'',
	                gender: '',
	                ethnicity: '',
	                veteran: '',
	                disability: '',
	                resumeInfo: {}
	            });
	        },
	        set: function set(value) {
	            this._.form = value;
	        }
	    }, {
	        key: '_publicServiceUrl',
	        get: function get() {
	            var result = this._.publicServiceUrl;

	            if (!result) {
	                var corpToken = this.configuration.service.corpToken;
	                var port = parseInt(this.configuration.service.port) || 443;
	                var scheme = 'http' + (port === 443 ? 's' : '');
	                var swimlane = this.configuration.service.swimlane;

	                result = this._.publicServiceUrl = scheme + '://public-rest' + swimlane + '.bullhornstaffing.com:' + port + '/rest-services/' + corpToken;
	            }

	            return result;
	        }
	    }, {
	        key: 'requestParams',
	        get: function get() {
	            var _this = this;

	            return this._.requestParams || (this._.requestParams = {
	                firstName: function firstName() {
	                    return encodeURIComponent(_this.form.firstName);
	                },
	                lastName: function lastName() {
	                    return encodeURIComponent(_this.form.lastName);
	                },
	                email: function email() {
	                    return encodeURIComponent(_this.form.email);
	                },
	                phone: function phone() {
	                    return encodeURIComponent(_this.form.phone || '');
	                },
	                zip: function zip() {
	                    return encodeURIComponent(_this.form.zip || '');
	                },
	                gender: function gender() {
	                    return encodeURIComponent(_this.form.gender);
	                },
	                ethnicity: function ethnicity() {
	                    return encodeURIComponent(_this.form.ethnicity);
	                },
	                veteran: function veteran() {
	                    return encodeURIComponent(_this.form.veteran);
	                },
	                disability: function disability() {
	                    return encodeURIComponent(_this.form.disability);
	                },
	                assemble: function assemble(resume) {
	                    var type = resume.name ? resume.name.substring(resume.name.lastIndexOf('.') + 1) : 'txt',
	                        url = '?externalID=Resume&type=Resume&firstName=' + _this.requestParams.firstName() + '&lastName=' + _this.requestParams.lastName() + '&email=' + _this.requestParams.email() + '&phone=' + _this.requestParams.phone() + '&zip=' + _this.requestParams.zip() + '&gender=' + _this.requestParams.gender() + '&ethnicity=' + _this.requestParams.ethnicity() + '&veteran=' + _this.requestParams.veteran() + '&disability=' + _this.requestParams.disability() + '&format=' + type;

	                    if (window.location.href.indexOf('source=') > -1) {
	                        var sourceRegex = /(source=)([A-Za-z0-9\-]+)?/;
	                        var source = window.location.href.match(sourceRegex)[0];
	                        url += '&' + source;
	                    }
	                    return url;
	                }
	            });
	        }
	    }]);

	    return ApplyService;
Thanks for your help!

DanJSupport
User
Posts: 31
Joined: Mon Aug 15, 2016 9:57 am

Re: Custom form field not getting passed through on the career portal

Post by DanJSupport » Tue Aug 28, 2018 9:50 am

Hi Mistermanu,

The best place for your question would be on the Career Portal Git Hub: https://github.com/bullhorn/career-portal/issues

I would suggest you ask your question there and a member of the Open Source Career Portal Development Team will respond.
Dan Johnson
Tier 2 / Enterprise Support
Bullhorn Support US: 617-478-9126
Bullhorn Support UK: 44 800 032 2848
Bullhorn Support Australia: 61 28 073 5089
Bullhorn Support International: 617-478-9131

Post Reply