Appnitro Software Forums » MachForm

A Simple Thought

(4 posts)

  1. Hi,

    GREAT product, we love it!

    I have 1 question (for now).

    Is it pissible to change the wording on the submit button?

    To me this is just a lable, but i could not find it in the css.. Is it maybe possible to allow this on a future upgrade? And example would be .. the Standard form button says Submit ... I am building Surveys with the form and want to change Submit to: Submit And Get 2 Free downloads! ... just an off cuff example.

    Thanks!

    Bob

    Posted 4 years ago #
  2. Thanks for the suggestion!

    At this moment, you can edit includes/view-functions.php file to change your submit button label.

    Search around line 1581, you'll find this:

    <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />

    Just change the value attribute there.

    Posted 3 years ago #
  3. Thanks for the hack :-).. That will work fine but wont that change all forms? What I was suggesting would allow a change on a form by form basis...

    Bob

    Posted 3 years ago #
  4. Ahh.. now I get it. Interesting, I've never think of that before.
    Thanks again.

    Just in case you interested with another hack, here is a way to do it. Edit your includes/view-functions.php, around line 1577 - 1583 you will find this code:

    $button_markup =<<<EOT
    	<li class="buttons">
    	    <input type="hidden" name="form_id" value="{$form->id}" />
    	    {$edit_markup}
    	    <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
    	</li>
    EOT;


    Change it to be:

    if($form_id == 1){
    	$submit_label = "Custom Submit for Form 1";
    }elseif($form_id == 2){
    	$submit_label = "Custom Submit for Form 2";
    }else{
    	$submit_label = "Submit";
    }
    
    $button_markup =<<<EOT
    	<li class="buttons">
    	    <input type="hidden" name="form_id" value="{$form->id}" />
    	    {$edit_markup}
    	    <input id="saveForm" class="button_text" type="submit" name="submit" value="{$submit_label}" />
    	</li>
    EOT;


    That way each form would have different submit label. Simply adjust the if statements above.

    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.